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: 
Not applicable

Date Button/Filter: Last 12 Months

I have many sheets which use a date field within charts. Similar to a list box to filter by year, I'd like to have an option for the user to select Last 12 Months instead of manually picking 365 days.

Is this possible? Is it better as a button? How would I write this expression? Basically it is if my date field is >= 365 days ago, show it if clicked or if deslected show all data.

Thanks in advance!

1 Solution

Accepted Solutions
maximiliano_vel
Partner - Creator III
Partner - Creator III

From Recipes | QlikView CookBook - Rob Wunderlich

Recipes | Qlikview Cookbook

Regards

View solution in original post

3 Replies
maximiliano_vel
Partner - Creator III
Partner - Creator III

From Recipes | QlikView CookBook - Rob Wunderlich

Recipes | Qlikview Cookbook

Regards

Kushal_Chawda

Create field monthyear using monthname(Date)

Create expression:

=sum({<year,month,monthyear={">=$(=addmonths(max(monthyear),-11))<=$(=addmonths(max(monthyear),0))"}>}Sales)

Not applicable
Author

Thank you! This was perfect!