Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

wonkymeister
Contributor

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
Highlighted
anbu1984
Honored Contributor III

Re: Custom Sort Order

In expression of Sort tab, use below

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

View solution in original post

4 Replies
Highlighted
anbu1984
Honored Contributor III

Re: Custom Sort Order

In expression of Sort tab, use below

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

View solution in original post

Partner
Partner

Re: Custom Sort Order

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

Partner
Partner

Re: Custom Sort Order

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
Contributor

Re: Custom Sort Order

many thanks - got Monday morning brain fog