Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
wonkymeister
Creator
Creator

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')

View solution in original post

stigchel
Partner
Partner

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
Partner

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
Creator
Author

many thanks - got Monday morning brain fog