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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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?

Labels (1)
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