How do we distinguish sales that are unprofitable? Let’s say were analysing specific products across different regions like below but we want to know how unprofitable our sales are…
Image 1. Sales Across Regions
First, we want to create a boolean calculated field for unprofitability. Create a calculated field as below.
Image 2. Creating a Field for Unprofitability
We know that this is a boolean calculation because of the =T|F symbol next to our created field. Using this we can bring the field into the view as a marks color. However, we need to change the calculation type under the sales field. We do this by right-clicking and choosing the add table calculation.
Image 3. Adding Table Calculation
Now we change calculation type to a percent of the total and compute by specific dimension. The only field we leave checked is the unprofitable transaction we created earlier.
Image 4. Computing Table Calculation
I’ve colored the card to show red for true and grey for false values. This is great for identifying what percentage of our total sales is unprofitable.
Image 5. Unprofitability
I have simply reordered the unprofitability transaction card on the right to show true values at the end of the bar for better clarity.