Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select broken years

I present Year and Month apart from each other in two list boxes. How do I select a broken year, such as November 2012 till Oktober 2013? 

Now I see January till December for the years 2012 and 2013.

1 Solution

Accepted Solutions
Not applicable
Author

Hello,

You can achieve this by adding in your script a field (as MonthYear) that combines both of Year and Month together like this:

LOAD Year,

Month,

Month & '-' & Year as MonthYear,

etc...

Or if you have the actual date you can do this:

LOAD TrxDate,

Year(TrxDate) as Year,

Month(TrxDate) as Month,

Date(MonthStart(TrxDate), 'MMM-YYYY') as MonthYear

etc...

Then simply use that MonthYear field as a listbox.

Hope this helps.

View solution in original post

2 Replies
Not applicable
Author

Hello,

You can achieve this by adding in your script a field (as MonthYear) that combines both of Year and Month together like this:

LOAD Year,

Month,

Month & '-' & Year as MonthYear,

etc...

Or if you have the actual date you can do this:

LOAD TrxDate,

Year(TrxDate) as Year,

Month(TrxDate) as Month,

Date(MonthStart(TrxDate), 'MMM-YYYY') as MonthYear

etc...

Then simply use that MonthYear field as a listbox.

Hope this helps.

Or
MVP
MVP

Monthname(TrxDate) does the trick quite nicely.