Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting on QS pivot table

hi all,

i have a pivot table like this pivot_table.PNG

how to sort the inner field "area" and "cell" from highest to lowest based on the "count(Result)"?

i have already checked the sort by expression with expression "count(Result)" for both "area" and "cell", but can't get the result that i want.

Thank.

6 Replies
Anonymous
Not applicable
Author

Hello,

Try sorting with Aggr() function.

aggr(count(RESULT),BOBSLED,AREA,CELL)

If you don't use aggr(), count() works on the total level, not in the dimensionality you want to aggregate at. Meaning, it ignores, BOBSLED and area dimensions.

BR

Serhan

Anonymous
Not applicable
Author

hi Serhan,

shld i using uuttype rather than BOBSLED? but i tried both

i replaced the expression with aggr(count(Result), uuttype, area, cell) but it didn't work,

can you explain in more detail?

Anonymous
Not applicable
Author

Hello,

Is it possible you send me the application?

BR

Serhan

Anonymous
Not applicable
Author

hi Serhan,

here is my sample app

Thanks

Anonymous
Not applicable
Author

Hey,

Sorry, my bad. Exactly I meant uttype instead of BOBSLED. I have bad eyes

Also I thought this technique would work like in QlikView without testing.

I checked community a bit and there are many entries like that. So it means it is not the same behaviour as in QlikView.

Please check the following and refer to Gysbert's answer. He is quite an expert.

https://community.qlik.com/thread/165277

I applied his solution with a simplification in your app. It should be the same logic when the third dimension comes into play. Attached is your app.

BR

Serhan

Anonymous
Not applicable
Author

hi Serhan,

thank you for your suggestion, but

it seems like it is not perfectly sorted, and have some duplicate cell field appear.

n i tried another way to create a variable to sort it but also cant work perfectly.

im confused.