Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ndeeleysww
Creator
Creator

Just how DO I sort by expression in Qlik Sense?

Hi all,

I've added some data to a pivot table, but of course it's never in the order  that's needed!

The rows are text, and I can't sort them alphabetically as that isn't what its required.

Assuming the Column is [Costheader] and has values of 'Sales', 'Gross Costs' and 'Labour', what expression can I use to order them in this fashion?

Any help gratefully received!

Thanks

Neil


1 Solution

Accepted Solutions
rubenmarin

Hi Neil,

You'll need to drag up this column so it's the first in the sort tab, uncheck sort auto and check 'sort by expression' can use this expression:

Match([Costheader], 'Sales', 'Gross Costs' and 'Labour')

View solution in original post

5 Replies
rubenmarin

Hi Neil,

You'll need to drag up this column so it's the first in the sort tab, uncheck sort auto and check 'sort by expression' can use this expression:

Match([Costheader], 'Sales', 'Gross Costs' and 'Labour')

ndeeleysww
Creator
Creator
Author

Brilliant!  - thanks Ruben!

Not applicable

Helpful, thanks Ruben!

jbchurchill
Creator
Creator

I'm not getting the expected result from this for some reason. Is it Ok to ask here or do I need to start my own thread. They items I'm sorting are not coming out in a custom order. 

Match([MyField], 'Aaaa', 'Bbbb', 'Zzzz', 'Dddd' and 'Cccc')

I expected this field (which is the top most in the multi KPI) to be in the order as shown (A, B, Z, D, C) but they are not.

jbchurchill
Creator
Creator

Never Mind. I took the and out and it seemed to magically work?