Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I am looking to aggregate a metric by a ranked dimension by i'm getting some errors:
Make | Model | Price |
Ford | Focus | $5,000 |
Ford | Mondeo | $8,000 |
Peugeot | 206 | $2,000 |
Peugeot | 106 | $5,000 |
Toyota | Yaris | $4,000 |
Toyota | Camry | $12,000 |
Toyota | Premio | $8,000 |
Honda | Civic | $2,500 |
Honda | hr-v | $4,000 |
Above is a test example. I want to find the top 2 'Make' based on the highest price (in this case Ford = $13,000 and Toyota = $24,000). Then based on them, I want to count how many models there are (in this case Ford = 2 and Toyota = 3).
The final output I want is just the metric 5 (2+3). I have used lots of different combinations of aggr, rank, variables etc but cannot get it to work without pulling in the 'model' dimension as a table.
Any help of how to do this so that I can just display 5 as a metric would be much appreciated.
Thanks
=Count( Aggr( NODISTINCT if(rank(Sum(Price))<3, Make), Make) )