Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.