Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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