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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Date Filter Help

Hi Folks,

Please see the attachment and help me for 30, 60 and 90 days filter from today's date .

Result should be exactly same as calender.

Thanks,
AS

6 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Amit,

you can do it simply if your refer to the following article:

https://community.qlik.com/blogs/qlikviewdesignblog/2014/06/06/dynamically-selecting-timeframes

Hope this point you in the right direction

Andy

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Add flag fields to your calendar(s)

LOAD

     ...other fields...,

     If( today()-Datefield<=30,1,0) as InLast30Days,

     If( today()-Datefield<=60,1,0) as InLast60Days,

     If( today()-Datefield<=90,1,0) as InLast90Days,

     ...some other fields...

FROM ...


talk is cheap, supply exceeds demand
amit_saini
Master III
Master III
Author

Hi Andrew,

See I know how to filter based on days , but problem is after these filters Calender selection result and result based on filters is not same.

Script Side:

Let vToday = num(Today());

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

30 days filter in list box:

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

similarly I have done for 60 and 90 days filter.

Thanks,
AS

amit_saini
Master III
Master III
Author

Gysbert,

Thanks for your reply , all these I tried but issue is numbers are not matching. See below issue:

  1. Example.

2015 filter: Week 4 2015 shows around 300 open tickets in the workload.(This result when you are doing selection from calendar objects)

90 filter: Week 4 2015 shows around 25 open tickets in the workload. Suspect the 30/60/90 filter is only showing tickets raised in the last 30/60/90 rather than the status over the last 30/60/90 (Result when you are doing selection for last 90 days filter)

Just to take example of week4-2015 , based on calender workload is around 300 and based on 90 filter it is around 25 . This data should match even if I'm doing selections from filters.

Thanks,

AS

amit_saini
Master III
Master III
Author

Check this Bucket in application.

Thanks,
AS

amit_saini
Master III
Master III
Author

Hi . jagan‌ , gwassenaar

any suggestions here???

Thanks,

AS