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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
mhapanka
Creator
Creator

How do I sort my dimension containing months in ascending order?

Hi team, I urgently require help on my dashboard. 

I am creating a dashboard from an attached csv file. I have a field called YearMonth that contains values like Jan-06,..,Mar-06, Apr-06,May-06 etc and so on till Dec-07.

I need to sort these in ascending order  so that they are in the order mentioned above rather than what can be seen in the picture. Could someone please help me out with the code for this?

Greatly appreciate your time on this,

Thanks

 

Labels (1)
1 Reply
Vince_CH
Creator III
Creator III

Hello, I didn't see your picture, but I supposed the existing format was not in numerical format, hence you need to re-format it, please try the following in the load editor:
Date#(Year([field]) & '-' & Month([field]), 'MMM-YYYY') as MonthYear,

Option 2 is to use dual():
Dual(YearMonth, RIGHT(YearMonth,2)&NUM(LEFT(YearMonth,3))) as YearMonth,