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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Lakshmanan
Partner - Contributor III
Partner - Contributor III

Sort Order in Pivot as Cross table

Hi All,

I have tried multiple options to sort the pivot -cross table in qlikview for the "Total" in descending order for each Name, but didnt work . If anyone has resolved this , kindly share the solution 

Lakshmanan_0-1754922240923.pngsample :

load * inline [
Name,Category, TagName , Value
ABC, Bird ,XYZ,300
ABC,Animal,YYY, 200
CDE,Bird,ZZZ, 100
CDE,Pet,YYY,300
ABC,NonPet,XYZ,150


];

Labels (1)
  • Chart

1 Solution

Accepted Solutions
marcus_sommer

Sorting within a pivot is difficult to impossible - at least with the normal approaches. In many cases you will need a workaround - quite common is here to use a calculated dimension which contained beside the visible dimension-values also an appropriate numeric value, for example for the dimension Category with something like:

dual(Category, Aggr(Sum(Value), Name, Category)))

and then sorting this field within the properties numerically.

View solution in original post

4 Replies
Chanty4u
MVP
MVP

Try this 

Aggr(Sum(Value), Name, Category)

 

Lakshmanan
Partner - Contributor III
Partner - Contributor III
Author

No didnt work , still the same , not sorted for each name

Lakshmanan_0-1755078449673.png

Lakshmanan_1-1755078480544.png

 

marcus_sommer

Sorting within a pivot is difficult to impossible - at least with the normal approaches. In many cases you will need a workaround - quite common is here to use a calculated dimension which contained beside the visible dimension-values also an appropriate numeric value, for example for the dimension Category with something like:

dual(Category, Aggr(Sum(Value), Name, Category)))

and then sorting this field within the properties numerically.

Lakshmanan
Partner - Contributor III
Partner - Contributor III
Author

Thank you it worked.