Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MikeH1983
Contributor III
Contributor III

X-Axis Dual sorting not functioning

Hi all. I have a chart of Age data in 5 year buckets on the X Axis. I cannot get it to sort the buckets in the correct order. Maybe I am doing something wrong as a new user? 

As per the screenshot, I have selected Numerical sorting, but it has no impact. In fact no matter what options I choose under Sorting > Age (Bucketed) there is no change. 

I used the default Qliksense bucket function which has created the right bucket intervals. The load code:

If(floor((Today()-(Date([Birth date] )))/365.25) < 20, Dual('[, 20)', 1),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 20 and floor((Today()-(Date([Birth date] )))/365.25) < 25, Dual('[20, 25)', 2),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 25 and floor((Today()-(Date([Birth date] )))/365.25) < 30, Dual('[25, 30)', 3),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 30 and floor((Today()-(Date([Birth date] )))/365.25) < 35, Dual('[30, 35)', 4),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 35 and floor((Today()-(Date([Birth date] )))/365.25) < 40, Dual('[35, 40)', 5),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 40 and floor((Today()-(Date([Birth date] )))/365.25) < 45, Dual('[40, 45)', 6),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 45 and floor((Today()-(Date([Birth date] )))/365.25) < 50, Dual('[45, 50)', 7),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 50 and floor((Today()-(Date([Birth date] )))/365.25) < 55, Dual('[50, 55)', 8),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 55 and floor((Today()-(Date([Birth date] )))/365.25) < 60, Dual('[55, 60)', 9),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 60 and floor((Today()-(Date([Birth date] )))/365.25) < 65, Dual('[60, )', 10),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 65 and floor((Today()-(Date([Birth date] )))/365.25) < 70, Dual('[65, )', 11),

If(floor((Today()-(Date([Birth date] )))/365.25) >= 70, Dual('[70, )', 12))))))))))))) AS [Age (Bucketed)]

 

Any clues are appreciated! Thanks

Labels (3)
0 Replies