Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a list of customers with a Rank created in the load area.
My dashboard is filtering to a single customer to show a page of KPI's.
However I want to include a chart with my chosen customer and others in the same group.
We group by rankings of 1 to 10 , 11 to 20 for example.
So if I pick customer DEF002 (Rank 2)) and I get the sum of sales for that one ie 190000, I want to show the average of Sales in the peer group ie Rank 1 to 10 customers.
If pick customer DEF007 (Rank 12) then I want the average of sales in the peer group Rank 11 to 20.
Thanks
Steve
Customer | Rank | Sales |
ABC001 | 1 | 200000 |
DEF002 | 2 | 190000 |
ABC002 | 3 | 180000 |
DEF003 | 4 | 170000 |
ABC003 | 5 | 160000 |
DEF004 | 6 | 150000 |
ABC004 | 7 | 140000 |
DEF005 | 8 | 130000 |
ABC005 | 9 | 120000 |
DEF006 | 10 | 110000 |
ABC006 | 11 | 100000 |
DEF007 | 12 | 90000 |
ABC007 | 13 | 80000 |
DEF008 | 14 | 70000 |
ABC008 | 15 | 60000 |
DEF009 | 16 | 50000 |
ABC009 | 17 | 40000 |
DEF010 | 18 | 30000 |
ABC010 | 19 | 20000 |
ABC011 | 20 | 10000 |
Avg Sales for rank between 1-10
=avg({<Customer={"=rank(sum(Sales),4,2)<11"}>}Sales)
Avg Sales for rank between 11-20
=avg({<Customer={"=rank(sum(Sales),4,2)>=11 and rank(sum(Sales),4,2)<=20"}>}Sales)