
1. Re: KPI based upon comparison within single dimension
Benjamin Greene Aug 29, 2016 11:20 AM (in response to Brad Slaughter)1 of 1 people found this helpfulIt's tough to give an exact solution without more context, but here's a shot:
IF {FIXED [Dimension] : SUM(IF [mkt]="a" THEN [Measure] END)} > {FIXED [Dimension] : SUM(IF [mkt]="b" THEN [Measure] END)}
THEN "↑"
ELSE "↓"
END

2. Re: KPI based upon comparison within single dimension
Brad Slaughter Aug 29, 2016 11:53 AM (in response to Benjamin Greene)Sorry, I did not have a masked dataset available. I have attached a workbook to my initial post. I get an can't mix aggregates message with your fix.

3. Re: KPI based upon comparison within single dimension
Benjamin Greene Aug 29, 2016 1:26 PM (in response to Brad Slaughter)OK I got something. I went ahead and added one more dimension and a few rows with random values into your sample data to help frame the solution.

Test Data.twbx 21.2 KB


4. Re: KPI based upon comparison within single dimension
Brad Slaughter Aug 30, 2016 10:50 AM (in response to Benjamin Greene)Thanks for the help, Benjamin! I made a slight tweak to your solution. I actually didn't need to do a fixed calculation because of how I was going to set up the final viz.
IF (SUM(IF [MKT]="MKT A" THEN [Dollars] END) 
SUM(IF [MKT]="MKT A" THEN [Dollars YAG] END))/
SUM(IF [MKT]="MKT A" THEN [Dollars YAG] END)
>
(SUM(IF [MKT]="MKT B" THEN [Dollars] END) 
SUM(IF [MKT]="MKT B" THEN [Dollars YAG] END))/
SUM(IF [MKT]="MKT B" THEN [Dollars YAG] END)THEN
"FASTER"
ELSE
"SLOWER"
END