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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wonkymeister
Creator III
Creator III

Custom Sort Order

morning,

struggling to engage brain today

i need to create a custom sort order for a dimension of text values.

ie

Car

Bus

Plane

Boat

etc

etc

any ideas? can DUALbe used in this scenario?

cheers.

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

In expression of Sort tab, use below

Match(Dim,'Car','Bus','Plane','Boat')

View solution in original post

4 Replies
anbu1984
Master III
Master III

In expression of Sort tab, use below

Match(Dim,'Car','Bus','Plane','Boat')

stigchel
Partner - Master
Partner - Master

Good morning,

Yes it's monday 🙂  And yes you can use the dual function. In load script load a dual value of the dimension, I would first load a map of sort order values

TextSort:

mapping load * inline [Text,SortOrder

'Car',1

'Bus',2

];

And then load the Dimension as

Dual(YourDim,Applymap('TextSort',YourDim)

In the chart sort your dimension by numeric value.

Regards,

Piet Hein

jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi WonkyMeister,

If you have a long list of items in your Dimension,

You can have a numeric Flag assigned to each unique item.

Applymap from a master list(excel,txt, or db table)

wonkymeister
Creator III
Creator III
Author

many thanks - got Monday morning brain fog