Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IsNull returns Null if value is Null

Hi

I'm getting strange behaviour from the IsNull() function. If there is a value it gives me 0. But if it's Null, the function returns Null and not -1.

If I do a Len() on the value, I also get Null where there is no value, so there really is no value.

I get this behaviour on both 64bit and 32bit.

Any help?

Thanks,

Brian

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Can you upload the qvw file.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Further discovery -

I'm using the IsNull() to apply a rule to the data and join the result of the function to the same table that has the field value that I'm checking.

If I try to join the field to the table as follows, I get the failure I described:

Left Join (TABLE_A)

Load

     KEY_FIELD,

     IsNull(VALUE_FIELD) as NullCheck

Resident (TABLE_A)

But, if I make it a whole new table, it works as I expect it to:

NEW_TABLE:

Load

KEY_FIELD,

IsNull(VALUE_FIELD) as NullCheck

Resident (TABLE_A)

What small peculiarity am I missing?

Tks,

Brian

PS: Thanks, Kaushik, I will upload a version when I get a chance.

erichshiino
Partner - Master
Partner - Master

This is strange...

What happens if you right this:

Left Join (TABLE_A)

Load

     KEY_FIELD,

     if( IsNull(VALUE_FIELD),0,1)  as NullCheck

Resident (TABLE_A)

?

or

Left Join (TABLE_A)

Load

     KEY_FIELD,

     if( len(VALUE_FIELD),1,0)  as NullCheck

Resident (TABLE_A)