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: 
Not applicable

Custom Sort in List Box

Hiya, I have some text fields denoting Periods in my data set. These are labels as follows:

Pre-Project

Q1 2012

Q2 2012

Q3 2012

Q4 2012

Q1 2013

I would like to custom sort them to they are in above order - but at present they won't do this (and either just go in load order or Q1 2012, Q1 2013 etc). Is there an expression I can use to sort these?

thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

It would be best to correct this in the script, by parsing in your periods as dates. dates have a numeric representation which you can use for sorting.

In the list box properties, you can also try a sort by expression:

=match( [Pre-Project], 'Q1 2012','Q2 2012','Q3 2012','Q4 2012','Q1 2013')

View solution in original post

2 Replies
swuehl
MVP
MVP

It would be best to correct this in the script, by parsing in your periods as dates. dates have a numeric representation which you can use for sorting.

In the list box properties, you can also try a sort by expression:

=match( [Pre-Project], 'Q1 2012','Q2 2012','Q3 2012','Q4 2012','Q1 2013')

Not applicable
Author

Brilliant that expression has resolved it! Thanks a lot for your help.