Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Top 3 Products within Top 10 Manufacturers

I am trying to build a pivot table which will show Only top 10 manufacturers based on CURRENT month sales and within Top 10 manufacturers I only want to show Top 3 products.

For the first dimension I am using 

=if(aggr(rank(total count({<Sales_month={'$(eCurrentMonth)'}>}DISTINCT SALE_ID)), Manufacturer)<= 10,Manufacturer)

Within each Manufacturer there could be many Products (second Dimension) How can I modify my second dimension Product to display only Top 3 Products WITHIN each  Manufacturer

 I have tried using this as my second dimension =if(aggr(rank(total count({<Sales_month={'$(eCurrentMonth)'}>}DISTINCT SALE_ID)), Manufacturer,Product)<= 10,Product) but this gives me Top 3 Products overall not within each Manufacturer

1 Solution

Accepted Solutions
sunny_talwar

How about this

=If(Aggr(Rank(Count({<Sales_month = {'$(eCurrentMonth)'}>} DISTINCT SALE_ID)), Manufacturer, Product)<= 3, Product)

 

View solution in original post

1 Reply
sunny_talwar

How about this

=If(Aggr(Rank(Count({<Sales_month = {'$(eCurrentMonth)'}>} DISTINCT SALE_ID)), Manufacturer, Product)<= 3, Product)