Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Sort Year Month by Expression

How to sort year month by Jan-2020 to Dec-2020? I have tried max(Date), Date(Monthstart(Date),'MMM-YYYY') as expressions. I even tried tried changing script to number like 12022 and it still didn't sort by month.

Labels (5)
2 Replies
Contributor II
Contributor II

if you are trying to sort it in any chart, you can goto "sorting" and change there.

Champion III
Champion III

you were close

sort by expression



or even better would be to load the yearmonthfield as a dual value field

,Dual(yearmonthfield,Monthstart(Date#(yearmonthfield,'MMM-YYYY'))) as yearmonthfield


Then just sort by Numeric value of this field



Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.