Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i have a pivot table like this
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.
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
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?
Hello,
Is it possible you send me the application?
BR
Serhan
hi Serhan,
here is my sample app
Thanks
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
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.