Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

An issue has been identified on Qlik Cloud hub, please visit our Status Update Page for details: GET THE LATEST
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Is it possible to order the result of AGGR ()?

Hi everyone, i have some problems with a metric that use AGGR() fuction.

With this metric i whant to know " how many customers represent the 80% of my sales" (Classic pareto analysis)

COUNT(AGGR(if(rangesum(top(($(M_SALES_YTD)),1,rowno()))/rangesum(top(($(M_SALES_YTD)),1,noofrows())) <=0.8,[Customer ID],Null()),[Customer ID]))

But if i put the value in a KPI, i saw the value is very large respect to value when i calculated in excel manually

When i put this metric in a table with customers id and sales amount, i can see the AGRR() function orderned the values alphabeticaly by Customer ID ( but i want sort the values by Sales Amount descending , to use this variable correctly)

Exist some way to give order the result of AGGR() function by a metric $(M_SALES_YTD) ?

Thanks in advance

2 Replies
Champion III
Champion III

Contributor II
Contributor II

hI bill, thanks for the fast reply.

I saw this link, but when i try to use the formulas exposed in this post the result in KPI is 0 or error directly.

i tried with :




But in all of this the result is wrong.

Im really confused with this feature.