Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

Want to sort month year in ascending order

Hi All,

 I have a column  Fiscal Mo/Yr  and I wanted to sort it in ascending order.

Fiscal Mo/Yr

1-2015
1-2016
1-2017
1-2018
2-2015
2-2016
2-2017
2-2018
3-2015
3-2016
3-2017
3-2018
4-2015
4-2016
4-2017
4-2018

O/P should be like 

1-2015
2-2015
3-2015
4-2015
5-2015

 

Labels (1)
  • sort

1 Reply
sunny_talwar

I am assuming you are talking about doing this in a chart where Fiscal Mo/Yr is a dimension? Try to replace your dimension like this

Date#([Fiscal Mo/Yr], 'M-YYYY')

and then sort numerically...

Alternatively, you can do this in the script

Date#([Fiscal Mo/Yr], 'M-YYYY') as [Fiscal Mo/Yr]

and then use  [Fiscal Mo/Yr] as dimension and sort numerically.