Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IsNull() function

hi, can anybody tell me in simple words what is IsNull() and why and where is it used?

15 Replies
qlikmsg4u
Specialist
Specialist

FInd the needful info on this thread.

https://community.qlik.com/message/489669#489669

satishkurra
Specialist II
Specialist II

Hi

In qlikview, we can handle null values in source in 2 ways.

1. IsNull

2. Alt function

Example:

LOAD * Inline [

Product, Sales, Rate

A,100,1.2

B,200,1.3

C,300, ];

Reload the above script and create straight table with Product as dimension and expressions as

Sum(Sales*Rate)

You will observe only 2 records as 1 record has null value.

Solution1:

In chart properties, expressions tab, modify expression as

Sum(Sales * Alt(Rate,1)

Solution2:

In script window, write the script as

if(ISNULL(Rate),1,Rate) as Rate

We can handle null values in the above fashion.

Let me know if there is anything required.

Thanks

Satish

Gysbert_Wassenaar

You can find that information in the help file. Open Qlikview and press the F1 key.

IsNull(expr )

Returns -1 (true) if expr returns NULL, otherwise 0 (false).


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

In simple words, as you ask:

IsNull(Field) returns true (-1) if the value of the Field is null, and returns false (0) if the value of the Field is not null.

Not applicable
Author

this is was not helpful at all..

Not applicable
Author

not helpful...I cudnt understand the basic meaning

Not applicable
Author

thanku ! very helpful indeed !

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Do you understand the concept of "NULL"?

NULL is a special value used in database products to signify that a cell or field contains nothing, not even the empty string or 0. It can also mean uninitialised, meaning that this cell has never been used before.

true and false are names for values that are actually numerical. true is equal to -1, and false is equal to 0. In QlikView you can use them interchangeably: it doesn't matter which one you use.


IsNull() is used - amongst others - to check whether a field or a table cell actually contains a value that should get your attention. You may prefer to act on IsNull() = true to fill some field with a default value (e.g. 'UNKNOWN') when it contains nothing, or to throw away a row when the most important field is missing.


It would help if you could tell us what exactly isn't clear to you instead of the Good/Not Good qualification.


Peter

Not applicable
Author

really sorry didn't meant that way..

n thanku for the explanation