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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
GrantBooth
Creator
Creator

Sort by expression in pivot table

I am trying to sort by expression in a pivot table and I'm having some issues. I've received the output I'm looking for, but I want to sort by another criteria, a numerical index for each title, say Batman = 1, Detective Comics = 2, Fantastic Four = 3, which is not part of the pivot table and I don't want to display it. I've been told to use 'sort by expression' but I'm not sure how to proceed.

Here's a mockup of how the data is displayed

PublisherTitleTotal Value# Issues
MarvelFantastic Four20050
Detective ComicsBatman2000770
Detective ComicsDetective Comics750300
1 Reply
brunobertels
Master
Master

Hi 

first approach could be adding a dumie table with an inline load before your fact table using dual function : 

sortingorder: 

load inline

 

Load dual ( Title,Title_index) as Title_Order inline

[ Title,Title_index

Batman,1

Detective Comics,2

Fantastic Four,3

x,4

y,5

z,6

 ];

then load your data 

in the data model tables should be linked by Title dimension

 

then in your pivot table order panel add this mesure rank(Title_Order)