Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
himabinduch
Creator
Creator

How to Use AGGR functon

Hi All,

i have three fields as below

product name, sale, profit

now i would like to show the top 10 product name and sales based on Profit.

(here i should sort the product names based on profit but should display sum(sales))

3 Replies
Anonymous
Not applicable

=if(

Aggr(Rank(Sum(Profit)), product name)<=10,

product name,

'Others'

)

Anonymous
Not applicable

Or following?

Dual(Aggr(Rank(Sum(Profit)), Country)<=10, product name,’’),Sum(Sales))

sumeet-vaidya
Partner - Creator
Partner - Creator

Hi Hima,

Please use below Calculated Dimension & Expression.

Calculated Dimension:

=if(aggr(rank(sum(Profit)),Product)<=10,Product)

Expression :

Sum(Sales)

Regards

Sumeet