Hello,
I have created a calculated field to get the dynamic date axis in a line chart for Weekly and Monthly selection based on a parameter.
But I am not able to custom sort it.
IF [Selector] = 'Weekly'
THEN STR(DATEPART('week',[DATE]))+"-"+LEFT(STR(DATENAME('month',[DATE])),3)
ELSEIF [Selector] = 'Monthly'
THEN LEFT(STR(DATENAME('month',[DATE])),3) +" ' "+ RIGHT(STR(YEAR([DATE])),2)
END
Is there a way to sort the date in ascending order?
Regards,
Tush
6 answers
Hi, Tushar
Please find my solution by introducing a sorting key calculation. (the calculation1 is your calculation)
Hope this helps
ZZ