Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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 sort

hi every one

i have a expression list box like below :

=if(A<=5,'0-5',

if(A>=6 and A<=10 ,'6-10',

if(A>=11 and A<=15 ,'11-15',

if(A>=16 and A<=20 ,'16-20',

if(A>=21 and A<=25 ,'21-25',

if(A>=26 and A<=30 ,'26-30',

if(A>30,'>30',

)))))))

i want sort that item like

0-5

6-10

11-15

16-20

21-25

26-30

>30

please help me ..

thanks

Hamide

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Try with dual

  =if(A<=5,dual ('0-5',1),

if(A>=6 and A<=10 ,dual ('6-10',2),

if(A>=11 and A<=15 ,dual ('11-15',3),

if(A>=16 and A<=20 ,dual ('16-20',4),

if(A>=21 and A<=25 ,dual ('21-25',5),

if(A>=26 and A<=30 ,dual ('26-30',6),

if(A>30,dual ('>30',7)

)))))))

Note : check the paranthesis and in the sort tab -> ascending

View solution in original post

5 Replies
Chanty4u
MVP
MVP

yes... the expression is correct only

Not applicable
Author

now what am i do ?

pra_kale
Creator III
Creator III

Hi,

You can create a field in a Data model itself say 'Bucket' and then under sort tab of List box under 'Expression' field put If condition like if(Bucket='0-5',1,if(Bucket=6-10',2 and so on. Unchecked all other sort option and just select sort Ascending from Expression.


It may helps.


settu_periasamy
Master III
Master III

Try with dual

  =if(A<=5,dual ('0-5',1),

if(A>=6 and A<=10 ,dual ('6-10',2),

if(A>=11 and A<=15 ,dual ('11-15',3),

if(A>=16 and A<=20 ,dual ('16-20',4),

if(A>=21 and A<=25 ,dual ('21-25',5),

if(A>=26 and A<=30 ,dual ('26-30',6),

if(A>30,dual ('>30',7)

)))))))

Note : check the paranthesis and in the sort tab -> ascending

Not applicable
Author

thanks alot