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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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