Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jpapador
Partner - Specialist
Partner - Specialist

Sorting within a Rank function

I am trying to obtain the top 25% of members in a given org.  My issue is that around the cut-offs there are ties.  With the Rank(Field, 4) I am able to get the right number of members but the wrong members that make up those numbers.  In a table box I can sort by the Rank first and then by the members ID number.  The issue is I am trying to use this expression in a text object so I am not able to use the sort tab.

Is there a way to Sort by Rank and then ID number within a text object.  I have already tried an Order By IDNumber ASC in the script and it didn't seem to make any difference.

1 Reply
Gysbert_Wassenaar

Use the ID number to create a fraction that can be added to the value you now rank on.

Maybe something like rank(Field+ IDNumber/100000,4)


talk is cheap, supply exceeds demand