Hi Experts,
I want to handle IS NOT NULL in scripting.
In OBIEE, they are using a case statement like,CASE WHEN NOT AMOUNT IS NULL THEN AMOUNT ELSE 0
we can write case statement as IF() statement. but I don't know how to write NOT IS NULL.
I think in QlikView we only ISNULL(), but there is no NOT IS NULL().
Can you help me in writing this.
Thanks,
Vivek
Or you can use this: Alt(Amount, 0). The alt function will return the second parameter (i.e. 0) if the first argument is not a number. Assuming that a field called Amount will never contain text strings that you want to keep as field value you can use the alt function.
There is isnull() function,but I prefer
len(trim(Field))=0
It works for values like NULL, blank, or multiple blanks.
use this code
if(isnull(Amount),0,Amount)
Hi, any of the answers you get can work, but in case you want to know, the 'NOT IS NULL()' version in QV can be:
If(not IsNull(Amount), Amount, 0)
Or you can use this: Alt(Amount, 0). The alt function will return the second parameter (i.e. 0) if the first argument is not a number. Assuming that a field called Amount will never contain text strings that you want to keep as field value you can use the alt function.