Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Button to select last 12 Months

Hello

I want to create a button which when you click selects the last 12 month in a particular list box. I've tried this by setting the actions on the button and it works fine. However, when I try to use a variable to contain the date 12 months ago it doesn't work. What am I doing wrong? Please see the attached example.

Thanks for your help!

James

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

You have to write in the second button in the search string this one

='>='&'$(twelveago)'

and it will works

Best wishes

View solution in original post

3 Replies
Not applicable
Author

Hi,

You have to write in the second button in the search string this one

='>='&'$(twelveago)'

and it will works

Best wishes

Not applicable
Author

This formule is the one i use, when i want to select the past 12 months

='>' & date(addmonths(today(), -13),'YYYYMM') & '<=' & date(today(),'YYYY')&(MonthMin1)  

MonthMin1 is a variable.

I set this variable whit this code:

=text(date(today(),'MM'))

I hope this helps you

Greetz,

Dirk

Not applicable
Author

This is a yearmonth construction

Greetz,

Dirk