Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense - Sort Expression with fixed values ?

Hi All,

In a pivot table, what would be the sort expression in order to have values of a text column in a pre-defined order ?

This dimension has 10 values and I want both of them to be my column 1 and column 2, others don't matter.

 

Thank you

Sébastien

Labels (1)
2 Solutions

Accepted Solutions
Gysbert_Wassenaar

Perhaps something like =match(only({1}YourDimensionHere),'Value1','Value2', ...etc, 'Value10'). The list 'Value1','Value2', ...etc, 'Value10' should be in the order you want to sort them.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

Perhaps something like =match(only({1}YourDimensionHere),'Value1','Value2', ...etc, 'Value10'). The list 'Value1','Value2', ...etc, 'Value10' should be in the order you want to sort them.


talk is cheap, supply exceeds demand
Not applicable
Author

It works perfectly, Thank you very much Gysbert.

Regards, Sebastien

Not applicable
Author

Found this really helpful, I am working on School Exam grades, so sorting the grades in A*, A, B, C, D, E, F, G, U was helpful.

I f implimented this at a subject level, i.e. English, Maths, Biology, Physics, Chemistry.....but the bar graph has a drill down, i.e. I select English and I can drill down to the classes in English, the expression sort order does not go to that drill down, but I am sure I can make it.

Does anyone know how...?

Lucius_Artorius_Castus

@Gysbert_Wassenaar Thanks, It worked for me too.