Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

isnull() not working in QlikSense

Hi,

I am trying to figure out the following problem.

Please take a look at the example below.

Achieved Start Date [AST]- is a field,from CSV file.

In my example the field is just empty. There is no spaces, no hidden characters etc.

Function isnull() return - 0 (FALSE). Not null? Thus it has something inside.

Interesting? Stay with me

My first thought - maybe Qlik recognizes this field as an empty string.

I try istext() function - the result is TRUE

Also, I tried len() function - the result is 0, so it means there is nothing - zero letters inside.


What is more interesting...

I try the isnum() function - it returns... FALSE.


ANY IDEAS WHAT IS GOING ON?

isnull.PNG

Edited information about isnum/istext results.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You're right - I typed wrong info about isnum/istext values.

Attached is sample csv.

As you can see in my case the AST is written as "". (two quotation marks, nothing between them).

Finally, I found the reason of this issue.

From Qlik Help:

"A string with length zero is not considered as a NULL and will cause IsNull to return False."


Nevertheless, it's ridiculous that isnull() doesn't work in that case.

There is no water in the glass, but the glass is not empty. - good one Qlik!

In this case:

ID, value

1,

2,""

3,"some text"

Results:

In case 1 isnull(value) returns True

In case 2 - False!!!

In case 3 - False

Qlik team has a lot to work on....

View solution in original post

3 Replies
m_woolf
Master II
Master II

Your statements about text vs numbers seems to be backwards from what the picture shows.

Maybe is you attached a sample csv with just a few records?

vkish16161
Creator III
Creator III

I suspect that this field has a missing value instead of a null value.

Remember that missing values are very different from null values.

Check this out:

NULL handling in QlikView

Anonymous
Not applicable
Author

You're right - I typed wrong info about isnum/istext values.

Attached is sample csv.

As you can see in my case the AST is written as "". (two quotation marks, nothing between them).

Finally, I found the reason of this issue.

From Qlik Help:

"A string with length zero is not considered as a NULL and will cause IsNull to return False."


Nevertheless, it's ridiculous that isnull() doesn't work in that case.

There is no water in the glass, but the glass is not empty. - good one Qlik!

In this case:

ID, value

1,

2,""

3,"some text"

Results:

In case 1 isnull(value) returns True

In case 2 - False!!!

In case 3 - False

Qlik team has a lot to work on....