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: 
gauravkhare
Creator II
Creator II

calculating last 30, 60, 90 days from a date field in qliksense

Hello Experts,

I need to calculate 30, 60, 90, past year etc from a date field and then to provide the outcome in the form of filters. Kindly provide solution

Thanks in advance

Gaurav

2 Replies
gauravkhare
Creator II
Creator II
Author

To be more precise the requirement is to take a filter having values like Prior Month, last 30 days, last 60 days, last year etc. when user selects for last 30 days from the filter than the chart should change accordingly

Kindly help

sunny_talwar

May be create flags in the script and use a link table:

LinkTable:

LOAD Date,

          'Last 30 Days' as Flag

Resident MasterCalendar

Where Date >= Today() - 30;

Concatenate (LinkTable)

LOAD Date,

          'Last 60 Days' as Flag

Resident MasterCalendar

Where Date >= Today() - 60;

Concatenate (LinkTable)

LOAD Date,

          'Last 90 Days' as Flag

Resident MasterCalendar

Where Date >= Today() - 90;

Concatenate (LinkTable)

LOAD Date,

          'Last 1 Year' as Flag

Resident MasterCalendar

Where Date >= AddYears(Today(), -1);

And then you can use Flag as your filter to select Last 30 Days or Last 1 Year