Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I do a custom sort on text values?

I have a chart that I want sorted as follows:

Past Due

Today

Due w/in 5 Days

Due Beyond 5 Days

I have added the following expression in the sort tab in the chart properties:

Match(vAGING_ORDER_BUCKET,'Past Due','Today','Due w/in 5 Days','Due Beyond 5 Days')

This is not working as I want with the chart sorting like this instead (whether I choose Ascending or Descending - makes no difference - not that I expected it too):

Due Beyond 5 Days

Past Due

Due w/in 5 Days

Today

Ideas??

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

use

Only({1}Match('$(vAGING_ORDER_BUCKET)','Past Due','Today','Due w/in 5 Days','Due Beyond 5 Days'))

or

Only({1}Match(vAGING_ORDER_BUCKET,'Past Due','Today','Due w/in 5 Days','Due Beyond 5 Days'))

View solution in original post

5 Replies
prieper
Master II
Master II

This formula should work, if vAGING_ORDER_BUCKET is a fieldname.

HTH Peter

MK_QSL
MVP
MVP

use

Only({1}Match('$(vAGING_ORDER_BUCKET)','Past Due','Today','Due w/in 5 Days','Due Beyond 5 Days'))

or

Only({1}Match(vAGING_ORDER_BUCKET,'Past Due','Today','Due w/in 5 Days','Due Beyond 5 Days'))

Not applicable
Author

Thanks for the quick reply.  It is a variable not a field.  As I'm new to this, I guess that matters.  That being the case, do you have another suggestion?  I tried the other suggestion by Manish and I still get the same result.

Not applicable
Author

Thanks for the reply.  I'm still getting the same result though.  As I said to Peter's reply, I'm using a variable and not a field.

Not applicable
Author

I tried the first suggestion by Manish with the $ (which I didn't do the first time - my bad) and it worked!  Thank you so much.