Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sorting the year - month values in the axis of chart

Hi all ,

i have a dimension Year & '-' & Month used in the axis of a bar chart.

the sorting is not working fine.

months order.PNG

the sorting of the years - months should  be in proper sort order

....

....

2015 - december

2016 - january

2016 - February

2016 - March

.....

....

Kindly help to solve this.

Thanks

1 Solution

Accepted Solutions
olivierrobin
Specialist III
Specialist III

hello

you can sort on year and month number (not name) by using a key like

year number * 100 + month number

(if you sort on month name, december will appear prior to january)

View solution in original post

6 Replies
prma7799
Master III
Master III

Go to Sort >> Sort by Expression >> Year & '-' & Month

Lisa_P
Employee
Employee

Go into the sort and sort by expression.

Use this expression:

(Year * 100 + Month)

vishweshwarisun
Partner - Creator
Partner - Creator

Capture.PNG

olivierrobin
Specialist III
Specialist III

hello

you can sort on year and month number (not name) by using a key like

year number * 100 + month number

(if you sort on month name, december will appear prior to january)

qv_testing
Specialist II
Specialist II

By default Sort order Text(A-Z) format, if you un-check the Text format that should work proper sort order.

or

Sort tab--> in Expression (MonthYear)

Capture.JPG

Anonymous
Not applicable
Author

Thanks Olivier

It worked!!