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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression to sort chart by two expressions

Hello,

I have a dimension comprised of two fields - Month and Year (=%Month&' - '&%Year).

I want to sort my chart so that the order is chronological (Nov-13, Dec-13, Jan-14, Feb-14, etc.). Presumably I need to sort by year first, then by month. Does anyone have an formula that will work for this?

Thank you

Mel

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Year*100 + Month

....

in this way you have a natural sort:

201401

201408

201501

...

let me know

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Year*100 + Month

....

in this way you have a natural sort:

201401

201408

201501

...

let me know

Not applicable
Author

That's great, thank you!

Anonymous
Not applicable
Author

When you create your dimension why not make it into QlikView MonthName format something like this

     =MonthName(MakeDate('2014','11'))

Then it will sort naturally as is and generally make your like easier.