Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

The Above() function is messing with an object's sorting order

I built a table whith a Dimension, (Dime); an expression, SUM(Expre); and another expression: 

Ev0.PNG

The last one is used to build a cumulative percentage of the SUM.

I have sorting priority with the SUM(Expre) expression, but whenever I add 2nd expression, it messes around my sorting order . How can I stop this from happening?

I add the data of the table loaded, evidence images and a qvf with the error replicated in it.

Infinite thanks to everyone in this forum, you're always inmmensively helpful and I appreciate it.

1) Data1) Data2) Table with just 1st expression2) Table with just 1st expression3) Table with 2nd expression that messes the order3) Table with 2nd expression that messes the order

Labels (1)
3 Replies
Gysbert_Wassenaar

Yes, using inter-record functions disables some sorting options:

https://help.qlik.com/en-US/sense/June2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterReco...

Sorting on y-values in charts or sorting by expression columns in straight tables is not allowed when chart inter-record functions are used in any of the chart's expressions. These sort alternatives are therefore automatically disabled.


talk is cheap, supply exceeds demand
julioarriaga
Creator II
Creator II
Author

So, I suppose I should use the aggr function in order to make it work, right? Thanks a lot for the clarification!
Gysbert_Wassenaar

Yes, that's correct. But you need to sort the aggr too with what's called a 'structured parameter':

sum(aggr(rangesum(above(count(Expre),0, RowNo())), (Dime,(=Count({1} Expre),Desc)) )) / count( total Expre)


talk is cheap, supply exceeds demand