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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
PRS
Creator
Creator

Filtering Contract Expiry Date

Hi Folks,

I am facing some issues while filtering Contract Expiry date.

i have a date field 'Contract Expiry Date' and i am comparing this field with today to know to know in how many days the contract is going to expire.

So, i have created a multi box with filters like 'Expired','30 Days','60 Days','90 Days','>90 Days' using below expression.

=if(fabs(date#(ContractExpiry,'YYYYMMDD')-Today())<=0,'Expired',

   if(fabs(date#(ContractExpiry,'YYYYMMDD')-Today())<=30,'30 Days',

   if(fabs(date#(ContractExpiry,'YYYYMMDD')-Today())<=60,'60 Days',

   if(fabs(date#(ContractExpiry,'YYYYMMDD')-Today())<=90,'90 Days',

   if(fabs(date#(ContractExpiry,'YYYYMMDD')-Today())>90,'>90 Days'

   )))))

When i am selecting 'Expired' or '30 days', it is showing correct result.

But when i select 60 days, it is showing dates which are >30 and <=60.

But the actual result should be, it should show all dates which are expiring with in 60 days. (i.e;from 1 to 60 days).

Same issue is existing for rest of filters(60 days and >90 Days)

I am attaching QVW for your reference.

Could anybody do needful and give me suggestions.

Thanks,

Rajasekhar

1 Reply
MK_QSL
MVP
MVP

Like this?