Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Drece-gkn
Contributor III
Contributor III

Button to filter by last 90 days

Hello, I have a column in a table called "Notification Opened Date". I also have a filter pane with a dimension that allows me to filter out dates by month. My goal is to create a Button that will show the last 90 days from whatever month I choose. How would I go about this?

3 Replies
daturpin
Partner - Creator II
Partner - Creator II

Vizlib button can have an action "set variable"

Create a variable called 'button_date', and have the Vizlib button set this variable equal to the dimension in the KPI chart.

Then to display it in a table, create a column where the Field expression is

=if($([Notification Opened Date]) - [button_date] <= 90, [Notification Opened Date])

Luckily, Vizlib treats dates as floating point numbers so '90' represents 90 days.

This will require tweaking for your precise situation but it's how I set up a time slider.

Drece-gkn
Contributor III
Contributor III
Author

So, I am attempting your way but ran into an issue with

 =if($([Notification Opened Date]) - [button_date] <= 90, [Notification Opened Date]). It says there is an error in the expression.

daturpin
Partner - Creator II
Partner - Creator II

Sorry, try

=if($(button_date) - [Notification Opened Date] <= 90, [Notification Opened Date])