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

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Add 30, 60 & 90 day date filters based on Date feild

Hi Folks ,

Looking for something like below, from today() date last 30 , 60 and 90 days filter in list box.

0 to 30 ->30

0 to 60->60

0 to 90 ->90

Kindly help!

Thanks,

AS

Labels (1)
14 Replies
Anonymous
Not applicable

Do you want to select last 30, 60 days of your calendar on the basis of filter selection?

MK_QSL
MVP
MVP

use this expression to create list box

=Aggr(Class(Today()-Date,30),Date)

or

=Aggr(DUAL(Replace(Class(Today()-Date,30),'<= x <','-'),Class(Today()-Date,30)),Date)

or

=Class(Today()-Date,30)

or

=DUAL(Replace(Class(Today()-Date,30),'<= x <','-'),Class(Today()-Date,30))

amit_saini
Master III
Master III
Author

Hi Manish ,

Thanks for you suggestion but please help me below:

Script:

   LOAD

    Datefield as %DateID,

    $(vToday)-floor(num(Datefield)) AS DaysDifference,

From

....

Inside list box I'm calling this expression :

=if(DaysDifference > 0 and DaysDifference <=30, '30',

    if(DaysDifference > 0 AND DaysDifference <= 60, '60',

    if(DaysDifference > 60 , '90',

    )))

Now I'm having 30,60,90 options inside list box, when I click on 30 it is giving me back 30 days from today, but when I'm clicking on 60 it is not giving me desired result .i.e  from today past 60 days and same with 90.

Kindly help!

Thanks,

AS

MK_QSL
MVP
MVP

=if(DaysDifference > 0 and DaysDifference <=30, '30',

    if(DaysDifference > 30 AND DaysDifference <= 60, '60',

    if(DaysDifference > 60 , '90',

    )))

amit_saini
Master III
Master III
Author

Sorry Still the same result.

Please see attachment for desired result.

Thanks,

AS

MK_QSL
MVP
MVP

Provide your sample application...or your sample date data...

amit_saini
Master III
Master III
Author

Please see the attachment and Compare Bucket with Date.

Thanks,
AS

MK_QSL
MVP
MVP

Use this expression to create list box

=Aggr(

  if(DaysDifference > 0 and DaysDifference <=30, '30',

    if(DaysDifference > 30 AND DaysDifference <= 60, '60',

    if(DaysDifference > 60 , '90')))

    ,%DateID)

Not applicable

Hi Amit,

How did you overcome this query, I am also facing the same problem if you have solution just share with me.

Thanks,

Ashok.