We are using an extension called Field UI that you can get from Qlik Branch.
You can define the expression for the button something like this. This particular button is for the past 90 days.
=if(CalendarDate > (today()-90), '90 Days')
You could do calculations like this on your fields for the time periods that you want to see when the user clicks on the button.
Hi Anil, the problem I am facing is that how to display the filter to show last24 hours, last 7 days etc
I created variables like this
LET v24HoursAgo = Date(now()-1, 'MM/DD/YYYY hh:mm:ss');
LET v7DaysAgo = Date(now()-7, 'MM/DD/YYYY hh:mm:ss');
and created filter panels with fields like =time > v24HoursAgo, but filter panel comes with a dropdown with values as -1 and 0 which we are looking to avoid here