Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to show top 3 sales product names under the category in straight table?

Hi All ,

how to show top 3 sales product names under the category in straight table?

i got rank of products by using the formula   =aggr(rank(sum(Sales)),Product)

now i want to show top 3 products in  each category  can any one help me to resolve it.

7 Replies
Not applicable
Author

Hi,

Try this

Aggr(Max(Sales,3),Product)

Not applicable
Author

Hi Rakesh Goud

Thank you for your quick response. the formula you have provided is not satisfying my conditions.[your not using any category]

Anonymous
Not applicable
Author

This will work:

if(aggr(rank(sum(Sales)),Product) <= 3 ,Product)

Not applicable
Author

Try this

if(aggr(rank(sum(Sales)),Product) <= 3 ,Category)

rustyfishbones
Master II
Master II

2014-10-21_1548.png

Not applicable
Author

Try this

if(aggr(rank(sum(Sales)),Product) <= 3 ,Category)

Not applicable
Author

I Need Like this

CategoryProductSales
Beverages
Côte de Blaye46563.08
Ipoh Coffee11069.9
Lakkalikööri7883.1
Confections
Gumbär Gummibärchen11225.65
Schoggi Schokolade10974
Tarte au sucre20762.82
Dairy Products
Camembert Pierrot20652.28
Gudbrandsdalsost14041.8
Raclette Courdavault33616.55
Grains/Cereals
Gnocchi di nonna Alice32604
Singaporean Hokkien Fried Mee5184.2
Wimmers gute Semmelknödel7125.47
Meat/Poultry
Alice Mutton16580.85
Perth Pasties12784.13
Thüringer Rostbratwurst33109.51
Produce
Manjimup Dried Apples23550.02
Rössle Sauerkraut12854.28
Uncle Bob's Organic Dried Pears9186.3
Seafood
Boston Crab Meat9796.33
Carnarvon Tigers15950
Ikura8819.5