Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression help


Hi,

What is the difference between the two expressions mentioned below:

1. if(isnull(ID),'N/A',ID)

2. if(isnull(ID)=-1,'N/A',ID)

Does the isnull function return some value?

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

The expressions are equal.

Any non-zero number in qlikview is evaluated as "True".

The isnull() function returns -1 (True) or 0 (false).

View solution in original post

4 Replies
simenkg
Specialist
Specialist

The expressions are equal.

Any non-zero number in qlikview is evaluated as "True".

The isnull() function returns -1 (True) or 0 (false).

Not applicable
Author

Thank you so much for such a quick reply..

Not applicable
Author

1. if(isnull(ID),'N/A',ID)   -  if id filed is having null values then returns N/A  other wise it returns id

2. if(isnull(ID)=-1,'N/A',ID   --  here when isnull(id)=-1  when id field is having null values then only expression true  , if it is true returns N/A  otherwise id

isnull function:

isnull(expr)   -  returns  -1(true) otherwise 0(false)

MK_QSL
MVP
MVP

Both are same...


If(IsNull(ID), FORTRUE, FORFALSE)

IsNull(ID) means any ID having NULL() values.... This will return some values....
as Simen replied, all Non_Zero numbers are true in qlikview