Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I created a combo chart with two measures and 1 dimension. The dimension/X axis is in format of "YYYY-MMM (example: 2023-Dec) ".
I would like to sort the X axis from oldest to newest date but can't figure out how. Any insights? In a line or bar chart where there is only one measure, the date sorting seems to be working fine.
Thanks!
Your date field is perhaps not a real date (numeric) field but text. You need to convert at the script or at the UI. One quick way if to use date parsing function date#(), like:
Date#(fieldName, 'YYYY-MMM') // in UI, i.e. - sort by expression
or,
Date(Date#(fieldName, 'YYYY-MMM') , 'YYYY-MMM') as fieldName // in script
Hi ,
Can you please try the option sort by expression as follows.
Year*100+Month something like this then it will sort numerically.
Regards,
Raju
Your date field is perhaps not a real date (numeric) field but text. You need to convert at the script or at the UI. One quick way if to use date parsing function date#(), like:
Date#(fieldName, 'YYYY-MMM') // in UI, i.e. - sort by expression
or,
Date(Date#(fieldName, 'YYYY-MMM') , 'YYYY-MMM') as fieldName // in script
that works - thank you!