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

Sorting Pivot table with 2 measures by total

Hello, I've created a pivot table of a categorical variable 'C' , and wanted to break down the count of 'C' by columns 'Team'. I am trying to sort by the total count of 'C' descending and tried to apply Sort By first measure = Y, but I'm still seeing lower totals at the top of the table. 

Could someone please advise how to properly sort by the total count? I've attached an image for clarification. Thank you for your help 

4 Replies
GaryGiles
Specialist
Specialist

In the Properties Panel for the chart, go to Sorting and turn off Auto sort for the Calc field.  Then choose "Sort by Expression" and enter the expression for the desired sort  order.  Choose "Ascending".

kevarista1
Contributor
Contributor
Author

Thank you. What kind of expression would work?

For instance, COUNT(Calc) is not working 

GaryGiles
Specialist
Specialist

Is Calc a field?  Use the same expression you used for the Measure field.

BTW, in my earlier post, I meant Descending, not Ascending

kevarista1
Contributor
Contributor
Author

Yes, COUNT(Calc) aka COUNT(field_name) is not working for some reason.