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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

List Box Sort

Hi

In have the following expression in a list box

=if(Inv_Criticality = 'A', 'Critical',

  if(Inv_Criticality = 'B', 'Semi Critical',

  if(Inv_Criticality = 'C', 'Non Critical',

  'Others')))

However, I am struggling to sort in the following order which is

  • Critical , Semi-Critical, Non Critical and Others.

I get the following below when used Match  

=Match(Inv_Criticality,'A','B','C','O')

List box sort.JPG

Thank you,

Kind regards

Nayan

1 Solution

Accepted Solutions
MarcoWedel

Hi,

maybe one solution might be to change your sorting expression to:

=Match(Inv_Criticality,'C','B','A')

and sort in descending order.

QlikCommunity_Thread_281331_Pic2.JPG

QlikCommunity_Thread_281331_Pic1.JPG

hope this helps

regards

Marco

View solution in original post

3 Replies
Anil_Babu_Samineni

Try to add your expression as

=if(Inv_Criticality = 'A', dual('Critical', 1)

  if(Inv_Criticality = 'B', dual('Semi Critical',2),

  if(Inv_Criticality = 'C', dual('Non Critical',3),

Dual( 'Others',4))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MarcoWedel

Hi,

maybe one solution might be to change your sorting expression to:

=Match(Inv_Criticality,'C','B','A')

and sort in descending order.

QlikCommunity_Thread_281331_Pic2.JPG

QlikCommunity_Thread_281331_Pic1.JPG

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Thank you Marco.  It worked.

Kind regards

Nayan