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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
alextomlins
Contributor III
Contributor III

Help?! ISNULL with expressions!?

Hi Guys,

I have a list of subscribers - All of them have start dates but only some have end dates depending on whether they have unsubscribed or not.

So for those that have not unsubscribed and have a null i would like to replace the null with the current date - and then calculate the number of days between the startdate and 'end date' '

So far i have ;

If(IsNull([UnsubscribeDateTime]),Today(), [UnsubscribeDateTime]) - [SubscribedDateTime]

The issue I'm having is the False part of the If statement - it's coming back as a blank. It works when replacing the null with the current date but does not give me the number of days for those that do have an unsub date strangely.

PLease help  

6 Replies
YoussefBelloum
Champion
Champion

can you share a part of your data ?

sunny_talwar
MVP
MVP

Is your date and time field read correctly as a date and time field with numeric underlying value?

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

OmarBenSalem
Partner - Champion II
Partner - Champion II

try If(len(trim([UnsubscribeDateTime]))=0 ,Today(), [UnsubscribeDateTime]) - [SubscribedDateTime]

alextomlins
Contributor III
Contributor III
Author

Hi Guys - I've now fixed this - There were two tables that get concatenated so I had to put the function into both of the loads   Thank you for your help

alextomlins
Contributor III
Contributor III
Author

Hi Guys - I've now fixed this - There were two tables that get concatenated so I had to put the function into both of the loads   Thank you for your help

alextomlins
Contributor III
Contributor III
Author

Hi Guys - I've now fixed this - There were two tables that get concatenated so I had to put the function into both of the loads   Thank you for your help