Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, can anybody tell me in simple words what is IsNull() and why and where is it used?
FInd the needful info on this thread.
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
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.
this is was not helpful at all..
not helpful...I cudnt understand the basic meaning
thanku ! very helpful indeed !
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
really sorry didn't meant that way..
n thanku for the explanation