Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tchambers
Contributor II
Contributor II

Auto-generated calendar months sort wrong

I have a table with a date field. I used the Data manager to create a MasterCalendar. It found my date columns correctly (both Created and Updated). But in this chart the months are sorted wrong (Feb, Apr, May, Mar, Jun, Aug, Jul). Order should be Feb, Mar, Apr, May, Jun, Jul, Aug.

I'm using qliksensedesktop 11.11.1 (June 2017).

What am I missing?

auto-generated-months-sort-wrong-e1009b.png

12 Replies
pradosh_thakur
Master II
Master II

something like this

select distinct Month as Month, rowno() as sort_order

resident master_calendar;

the sort month by sort_order field

note :your master calendar should load from min to max value

regards

Pradosh

Learning never stops.
shraddha_g
Partner - Master III
Partner - Master III

one workaround you can try:

use in Sort by Expression -

Pick(Wildmatch(Month,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),

1,2,3,4,5,6,7,8,9,10,11,12)

And use Ascending Order.

Also Uncheck all other sorting Options.

tchambers
Contributor II
Contributor II
Author

Thank you very much, rubenmarin‌!

For the benefit of others reading, I was confused at first because the MasterCalendar calculated fields are invalid in the expression. My DateField is "Created." Min(Created.Month) was not accepted, but Min(Created) was. Then I checked "Sort by expression" and got the chart I expected. Not too hard!