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: 
bluishjoe
Contributor III
Contributor III

Sort List Box by state and then by date

Hi, I have a List Box and its value is calculated by the expression

=MakeDate(ORDYEAR,ORDMONTH,ORDDAY)

I would like its values to be sorted first by state (possible or not possible) and then by its date value. I can't see this possibility to use more than one sorting rule giving them different priorities. Is there a way? Thanks!

7 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

use

sort by state and sort by number option in the sort tab

bluishjoe
Contributor III
Contributor III
Author

Thanks.

I tried that: sort by State Auto Ascending (or Ascending) and by Numeric Value Ascending.

But it sorts by numeric value and possible values are mixed inside non-possible ones.

I need all possible values on the top, sorted by date, and then all non-possible values.

CELAMBARASAN
Partner - Champion
Partner - Champion

Is that list box doesn't have scroll? i mean all data in listbox can be viewable without scrolling?

Celambarasan

bluishjoe
Contributor III
Contributor III
Author

It does have a scroll, it is a long list of dates.

Not applicable

I have the same problem (10 SR5). Sort works fine for State if the list is a simple field. But when I use an expression for the list I can't seem to do anything to make the items sort by state so that only valid options will show first.

In my case I have one list box that shows the system $Table values. If the user Qliks on a table then the other list box will show the $Field values. However, I don't want to show all of them I'm using the expression below to limit them.

 

= IF(Left($Field,1) <> '_' and Len($Field)>2, $Field)

Not applicable

Do you have tried the match-expression?

Match (text, mask_expr1, ...)

Own example:

Match( Day, 'Monday','Tuesday'.......,'Sunday')

bluishjoe
Contributor III
Contributor III
Author

Hi Patryk! How does your suggestion can be applied to my case?

Match(...) should replace MakeDate(...)?

Note that I need a List Box with a list of dates in the form DD/MM/YYYY or similar.