Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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))

Labels (1)
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