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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Months that load out of order...

Folks,

I want my Month selection box to read Jan, Feb, Mar, Apr, etc.  However, since our fiscal year starts in October, sorting the months by load order gives me Oct, Nov, Dec, Jan.  Any way around this?

Thanks,

R.

1 Solution

Accepted Solutions
Josh_Good
Employee
Employee

Yes there are several ways around this.  If your months are actually numeric and being displayed as text then if you sort by "Numeric Value".  If that doesn't work you can load an inline table of just the months in the correct order and then drop the table after you load your data.  This cause the load order to be in the order you desire.  If all else fails you can create a new field for month sort order and then sort the months based on that field.

View solution in original post

4 Replies
Josh_Good
Employee
Employee

Yes there are several ways around this.  If your months are actually numeric and being displayed as text then if you sort by "Numeric Value".  If that doesn't work you can load an inline table of just the months in the correct order and then drop the table after you load your data.  This cause the load order to be in the order you desire.  If all else fails you can create a new field for month sort order and then sort the months based on that field.

swuehl
MVP
MVP

Yes, use QV calendar functions like Month() to create values derived from dates that you can easily sort as human beings expect. Check also http://community.qlik.com/blogs/qlikviewdesignblog/2012/11/13/dual to learn more about the dual nature of QV values.

Clever_Anjos
Employee
Employee

Maybe this code can help you, generating a FiscalYear field that respects your need

LOAD

  Month,

  year(AddMonths(Month,3)) as FiscalYear;

LOAD

  date(AddMonths(Today(),-RecNo()),'MMM/YYYY') as Month

autogenerate 36

Not applicable
Author

Thanks, that worked!