Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

ISNOT NULL()-Scripting

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

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Anonymous
Not applicable

There is isnull() function,but I prefer

len(trim(Field))=0

It works for values like NULL, blank, or multiple blanks.

shubham_singh
Partner - Creator II
Partner - Creator II

use this code

if(isnull(Amount),0,Amount)

rubenmarin

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)

Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand
viveksingh
Creator III
Creator III
Author

Thanks gwassenaar‌.

it worked well.

Thank you ALL for the response .