Qlik Community

Third-Party Qlik Jobs

Area for people to learn more about current Qlik related job postings.

Highlighted
rupaliqlik
Contributor

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

 

1 Reply

Re: Want to sort month year in ascending order

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.