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

Sorting list box

I have sorted a list box by three criteria,

  •      firstly by the state (As auto ascending)
  •      secondly by an expression
  •      thirdly by text

My custom expression is    if(sum(round(quantity))>0,1,2)    ie so it sums up the activity and if is greater than one sorts first

This all works fine, however when i make other selections in other list boxes, and my options in the list box described above reduce, the grey options ie the ones unavailable for selection are not filtered in the correct order as mentioned above.

So when no selections are made the list box is sorted correcty as per above, when selections are made, the ones available are sent to the top as they should, but the greyed out unavailable selections are sorted as per the default setting,

is it possible for these options to be sorted as well as per my criteria above?

Thanks

Jon

4 Replies
Nicole-Smith

Try changing the custom expression to: if(sum({1}round(quantity))>0,1,2)

This should ignore the other selections that you're making.

Not applicable
Author

Thanks a lot for your answer, this works fine for me.

However I also have a different custom sort as per below which sorts the customers based on a standard rule for prefixes which we use.

I am currently experiencing the same issue as above, how can incorporate the modification into the formula below which isnt a sum formula

 

if(right([Cust ID],3) <> '_L5',1,2)

Not applicable
Author

Hi,

Use the sort expression you are using, in the script rather.

Let's say the column is SortOrder.

Then in the sort option of list box, use the expression only({1}SortOrder). This should work.

Nicole-Smith

Try:

if(right(only({1}[Cust ID]),3) <> '_L5',1,2)