Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
| Publisher | Title | Total Value | # Issues |
| Marvel | Fantastic Four | 200 | 50 |
| Detective Comics | Batman | 2000 | 770 |
| Detective Comics | Detective Comics | 750 | 300 |
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)