Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to sort the order displayed in the chart I have. The axis values are currently age groups so for example "-20", "20 - 25", "25 - 30", etc. If I use the sorting options availaible on the properties I cannot achieve what I would like which is "-20" at the top, etc.
Has anyone got the magic trick?
Thank you
Create your dimension values - the groups - as dual values.
Alt 1: Use the class function, class( age,5 )
Alt 2: Use the dual function, dual(<display text>, <numeric value from the middle of the range>)
Then you can sort your axis numerically. Both functions are described in the help.
/HIC
Hi,
Try the sort by expression option in the sort tab with expression as
=Num(Trim(SubField(AgeGroup,'-',2)))
Celambarasan
Thank you but this has not worked...
You can do this by adding an inline load to your script, something like:
LOAD * INLINE [
'"Age Group"', Sort
'"-20"', 1
'"20-25"', 2
'"26-30"', 3
'"30 +"', 4
];
Now you can use the new field (Sort) in a sort by expression.
Thank you all I got it to work!