Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
antoniotiman
Master III
Master III

Value NULL in set analysis?

Hi,

How can I set value NULL  in set analysis?

sum({<CostoVen={NULL}>} Sales)   [convert from sum(if(IsNull(CostoVen),Sales)]

Tanks You

32 Replies
Nicole-Smith

I'm guessing NULL would be the opposite of "is something":

sum({$-<CostoVen={'*'}>} Sales)

or

sum({$-<CostoVen={'?*'}>} Sales)

where $- means "not" and '*' or '?*' means "something"

antoniotiman
Master III
Master III
Author

Thanks.  I'm also going to try sum({$-<CostoVen={"%*%"}>} Sales).

jpapador
Partner - Specialist
Partner - Specialist

You could also make a null flag in your script.

If(Len(CostoVen) = 0, 1, 0) as NullFlag

Than your expression would look like this

sum({$<Nullflag={1}>} Sales)

Nicole-Smith

I'm not sure what you're trying to do with the percent (%) signs.  In QlikView the wildcards are asterisk (*) for zero or more characters and question mark (?) for one single character.

antoniotiman
Master III
Master III
Author

sum({$-<CostoVen={"%*%"}>} Sales) is OK.

Thanks.

kiranmanoharrode
Creator III
Creator III

Hi Antonio

Try this

=sum({<CostoVen={""}>} Sales)


Regards

Kiran

CELAMBARASAN
Partner - Champion
Partner - Champion

You could use the expression as below

Sum({<CostoVen-={"*"}>} Sales)


antoniotiman
Master III
Master III
Author

I could also make script :

NullAsValue CostoVen;

SET NullValue = 0;

but I cannot modify the script because of file.qvd very great that would not be adjourned.

antoniotiman
Master III
Master III
Author

Hi Kiran,

I have already tried. It doesn't work.

Thanks