Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List box sorting

i am having a problem in sorting the values of my list box.

I have used an expression in the listbox instead of dimension. the expression is: if(OBJECT= 'BOOK', if(BOOK_NAME= '1st BOOK' or BOOK_NAME= '2nd BOOK" or BOOK_NAME= '3rd BOOK', BOOK_NAME)).

And the values, i am getting in my list box. their order is:

1st BOOK

3rd BOOK

2nd BOOK

I want the order to be:

1st BOOK

2nd BOOK

3rd BOOK

I have tried all the soritng combinations, but it's not happening. can anyone suggest how to do this?    

3 Replies
Anonymous
Not applicable
Author

since you have 1,2,3 in your field values.. you can try as

left(Book_Name,1)

in the expression box and set the sort to ascending..

hope that helps..

Not applicable
Author

But, i think then sort by state doesn't work if you does sort by expression?? am i right, because that happened to me once.

Anonymous
Not applicable
Author

Sorting sometimes is not relaible for the calculated list boxes.  If it is important, better to create an additional field in the script, following the same rules.

Regards,

Michael