Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

gsmajdor
Contributor

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.

Tags (2)
1 Solution

Accepted Solutions
gsmajdor
Contributor

Re: isnull() not working in QlikSense

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....

3 Replies
mwoolf
Honored Contributor II

Re: isnull() not working in QlikSense

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
Contributor III

Re: isnull() not working in QlikSense

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

gsmajdor
Contributor

Re: isnull() not working in QlikSense

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....