Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Any idea about sorting ?

I have a list box , and I want to sort it in ascending or  decendinging order.

The list box contains aphanumberic values...I'm attaching the app..I tried doing by going to the properties,sort tab.. the thing is it only works if data is numeric or has alphabets..doesn't work for alphanumeric.

any ideas

thnx

1 Solution

Accepted Solutions
Not applicable
Author

Just sort by AC_AGE. See attached.

View solution in original post

3 Replies
whiteline
Master II
Master II

If you choose Sort by expression you should write that expression. For example =AC_AGE

But there is an easier way. Use dual function as a listbox expression:

=dual(FLOOR(AC_AGE)&'Years '&(AC_AGE - FLOOR(AC_AGE))*12 & ' Months', AC_AGE)

This returns dual value - numeric AC_AGE with your complex text format.

Then you can sort it just by Numeric Value.

The same trick works with calculated dimension, use:

=dual(FLOOR(AC_AGE)&'Years '&(AC_AGE - FLOOR(AC_AGE))*12 & ' Months', AC_AGE)

and sort it as number.

Not applicable
Author

Just sort by AC_AGE. See attached.

Anonymous
Not applicable
Author

Thank you Whitline and rebeccad..the solutions given by both of you works perfect..

B