I have created store P+Ls on Tableau buy bringing in sales, cogs, occupancy cost, payroll cost, and advertising cost to calculate contribution margin. I was able to separate the stores into quadrants by creating a measure I named "quadrants" and making an if statement. The if statement looks like this :
IF [CM %]>[CM%] Then
IF ([Total Sales])>[Sales] Then "I" Else "II" End
If ([Total Sales])>[Sales] Then "IV" Else "III" End
So basically, I have separated the stores by a certain contribution margin and sales cutoff that I created in parameters.
My problem is that I am trying to show totals by quadrant. When I add in grand totals, it gives me the total of all quadrants, so every store. I want to add in subtotals that are specific to each quadrant. Does anyone know how to do this? I tried using the add subtotals option, but it did not work. Thanks,