Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mwallman
Creator III
Creator III

How to write this date comparison IF statement where it should exclude "Missing" labelled dates?

Hello,

I have a dates table like this:

IDDate1Date2
121/05/201830/06/2019
215/01/201831/12/2018
324/04/2018Missing
410/02/201801/01/2018
517/04/2018Missing

How can I write an IF statement where it is something like IF(Date1<=Date,ID)

But also to add a clause where it excludes dates from Date2 field where they are classified as "Missing"?

1 Reply
sunny_talwar

May be this

If(Date1 <= Date2 and Date2 <> 'Missing', ID)

Or if Missing means null, then this

If(Date1 <= Date2 and Len(Trim(Date2)) > 0, ID)