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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
aheavy95
Creator
Creator

Sorting based on expression doesn't work after adding "rowno(total)"

Hi all 

Ran into a small sorting problem 

In this straight table, I want to show the row number to show where stores rank among others sales wise.

 

 

aheavy95_0-1691484677630.png

But once I add the -rowno(total) measure  the sorting that is selected by the Sales column does not work as stores are being sorted by the store number instead.

How can I solve this? hopefully there is a way

aheavy95_5-1691484871980.png

Thanks!

 

 

Labels (5)
3 Replies
marcus_sommer
MVP
MVP

AFAIK each usage of rowno() will disable the sorting. You may try to replace the rowno() with rank().

Murugesan
Partner - Contributor
Partner - Contributor

Hi 
You can sort the dimension (Store) using the sort by expression in Sorting tab

Murugesan_0-1732269901900.png

 

simsa
Contributor III
Contributor III

Alternately, you can use dimensionality() function:

If(Dimensionality() = 1,
    1,    // Data for regular rows
    2     // Data for totals
)