Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have the following chart with a derived Day/Month Axis that is used if the document is filtered for 30 Days or Less:
I'm having difficulty sorting the x-axis in ascending order. Im creating the Day/Month field during the load :
day(actual_date) & '-' & Month(actual_date) as [Day/Month],
If a the document is filtered for more than 30 days then a derived field of MonthYear is used :
date(monthstart(actual_date), 'MMM-YY')
the chart is sorted correctly when this is used.
Any help is appreciated.
Tom
Create your field as below and sort by numeric asc or desc order.
Date(actual_date,'DD-MMM')
Hey,
Did you try load order in sorting ?
Regards,
Navdeep
Load order option is 'greyed out'
Use Manish's suggestion (which is the best technique AFAIK) or in the sort tab, use sort by expression and put =actual_date in the expression field. Don't forget to select "Ascending".
The reason why your [Day/Month] field isn't working as expected is that the concatenation operation in your script stores a text-only value into [Day/Month], thereby losing the underlying numeric date value. Text values obey different sorting rules.
Peter