Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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!

Tags (2)
1 Solution

Accepted Solutions
maximiliano_vel
Contributor III

Re: Date Button/Filter: Last 12 Months

From Recipes | QlikView CookBook - Rob Wunderlich

Recipes | Qlikview Cookbook

Regards

3 Replies
maximiliano_vel
Contributor III

Re: Date Button/Filter: Last 12 Months

From Recipes | QlikView CookBook - Rob Wunderlich

Recipes | Qlikview Cookbook

Regards

Re: Date Button/Filter: Last 12 Months

Create field monthyear using monthname(Date)

Create expression:

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

Not applicable

Re: Date Button/Filter: Last 12 Months

Thank you! This was perfect!

Community Browser