Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting the dates by financial year

Hello Community,

I have a posting Year field that starts in Aug and ends in Jul however the sorting order is Jan to Dec, is there a way I can change this and where would I change it? in the expression properties or the main scripting area.

Thanks in Advance

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

you can set sorting to be an expression and use match function. The in the following example the match will return 1 if month=Aug, 2 if month=Sep etc.

match(Month, 'Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May','Jun','Jul')

Hope this helps!

Stefan

View solution in original post

3 Replies
Not applicable
Author

Hi,

you can set sorting to be an expression and use match function. The in the following example the match will return 1 if month=Aug, 2 if month=Sep etc.

match(Month, 'Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar','Apr','May','Jun','Jul')

Hope this helps!

Stefan

Not applicable
Author

Perfect! Thanks a bunch Stefan, Highly Appreciated!

fidaiazeem
Contributor II
Contributor II

Hi Airpartner,

U can also add a field in the calender table like

If(Num(Month(TempDate))>=8 AND Num(Month(TempDate))<=12,(Num(Month(TempDate))-7),(Num(Month(TempDate))+5)) AS MonthNumber


After Reload, go in Sort expression and sort by MonthNumber.

This field will help u in other charts also..

Hope this helps..

Regards,

Azeem