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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Ron1
Partner - Creator
Partner - Creator

Month-Year Dimension Sorting Not Working In Trends Line Chart

In a Line Trend chart I m showing last 6 months data.

However while the year is getting changed of 2019 to 2020 the trend sorting is getting hampered. Please help.

Dimension:

Month&'-'&right(Year,2)

My Output trend chart screenshot given as an attachment.

Please help me to rectify the sorting. Please find the attached imaage. Presently my sorting is line sort by expression(Ascending)

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Use a dual for the dimension, something like:

Dual(Month & Right(Year,2), MakeDate(Year, Month))

Select numeric sorting and this will sort correctly over a year end.

Its best to define this dimension during the load (in your calendar table, or if you don't have one, the fact table -- although a master calendar is  a better way).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Use a dual for the dimension, something like:

Dual(Month & Right(Year,2), MakeDate(Year, Month))

Select numeric sorting and this will sort correctly over a year end.

Its best to define this dimension during the load (in your calendar table, or if you don't have one, the fact table -- although a master calendar is  a better way).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Ron1
Partner - Creator
Partner - Creator
Author

Thanks. It works.