Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
itatspectrum
Partner - Contributor II
Partner - Contributor II

Rank / Class and a measure based on filter to others in group

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
Labels (1)
1 Reply
vinieme12
Champion III
Champion III

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)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.