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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
orital81
Partner - Creator III
Partner - Creator III

IsNull function returns Null

Hi,

Im getting strange behaviour from IsNull function.

When there is a value it returns 0, when there isn't it returns Null instead of -1.

Len function returns null as well.

This behaviour happens only on Access Point, not on QV Client.

Any help?

Attached the file, user / pass: qvadmin/qvadmin123

The null issue is in the GUI level.

When opening the file you will see a table with the first column called WBS.

The expression is If(IsNull(WBS),0,WBS)

It's working good when opening in QV Client, but when publishing on server and viewing on Access point

It's wrong.

8 Replies
orital81
Partner - Creator III
Partner - Creator III
Author

I will appreciate any help here (-:

Miguel_Angel_Baeyens

Hi,

I have been checking your file, but there is no indication on where the issue is happening? I guess it's in the script, but not sure. Can you please elaborate?

Note that IsNull() requires a parameter, either it be an expression or a field. If the field does not exist when you load it, then you get an error instead of a -1, not because the field is not null, but because it does not exist. Same may happen in the front end.

Miguel

hic
Former Employee
Former Employee

In addition to what Miguel points out, I just want to add that IsNull() when used in charts may in fact in some circumstances seem to return NULL: If you have missing values of type two, the expression is never calculated for these chart cells. So basically it looks as if IsNull() has returned NULL, when it in fact has not been calculated at all.

See more in NULL handling in QlikView

HIC

orital81
Partner - Creator III
Partner - Creator III
Author

Hi Miguel,

Let me clarify the issue:

The null issue is in the GUI level.

When opening the file you will see a table with the first column called WBS.

The expression is If(IsNull(WBS),0,WBS)

It's working good when opening in QV Client, but when publishing on server and viewing on Access point

It's wrong.

Anonymous
Not applicable

did you ever figure this one out? we have just upgraded from 10 to 11.2 and are facing a similar issue where if(isnull(FIELD_NAME) ,1,FIELD_NAME)) works in the client but on the access point it always returns null

rbecher
MVP
MVP

Hi Ori,

I think it's probably better to solve this in script..

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Anonymous
Not applicable

I stopped using IsNull() years ago. Try if this helps:

If(len(trim(WBS))=0,0,WBS)


rbecher
MVP
MVP

Right, but doesn't help either if the expression is not evaluated at all becaus of missing values.

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine