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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

Aggr with sort by expression

Hi, everyone,

I tried to sort an aggr by expression (just as it is used in a Pareto Analysis by Henric, https://community.qlik.com/t5/Qlik-Design-Blog/Recipe-for-a-Pareto-Analysis-Revisited/ba-p/1473684).

But it's not giving me the desired results, so I troubleshot my mistake with a simple example, and still it's not working. 

The data is:

Test:
LOAD * INLINE [State,Amount
Ags,789
Jx,180
Mor,471
];

And the table is:

Captura.PNG

But it's not giving me desired descending order. I know in this example it's not necessary to use an aggr with expression sorting, but I need to get it right, so I can progress to my more complex real problem.

This can be solved by a "sort by" from the script, but in my real problem I don't have this option.

I add the qvf also. 

As always, thank you for your help.

Labels (2)
2 Replies
premvihari
Partner - Creator
Partner - Creator

Hi,

Please try bringing the Aggr expression field first in sorting order you will see the desired result.

 
 
 
julioarriaga
Creator II
Creator II
Author

I already said in my post that this sorting is not an option, please, I'm not a newbie. The reason this is not an option is because I will be using inter record functions such as the 'Above' function.