Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

In the data that I work with, blank and null are always considered to be two different things, but if it doesn't make a difference in other data, your way would be best.  Thanks for clarifying

Anonymous
Not applicable

Thanks Nicole Smith.  I'm not sure what possessed me to believe that that wouldn't work.  I'm pretty sure I've done that exact thing in the past, but today I just wasn't thinking of it.  Either way, I am happy to concede the point.  You were right, I was wrong. 

Nicole-Smith

Just trying to share the knowledge.  Sometimes things are easier than we think

Anonymous
Not applicable

Thanks Michael,

I used to hate flags, now I love them.  Especially since I learned that they really only take up 1 bit per row.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Micheal,

I've had others tell me that

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

works, but it doesn't work for me Are you sure this still works? It may have changed with the search processing changes introduced in SR4.


I use the same solution as HIC and Nicole.

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

or ($) as in Nicole's example.


-Rob

Anonymous
Not applicable

Rob,

I was positive that -={'*'} worked.  Now can't reproduce it anymore.  At least, not in QV versions I still use, which include 11.20 SR5, 10 SR6, and 8.50.  Interestingly "syntax checker" reacts differently in all three versions:

- 8.50 doesn't indicate any errors

- 10 SR6 points to the minus before "=" as error

- 11.20 SR5 indicates error after the "=" and to the end of the expression.

But none works.

Well, from now on I'll be using the reliable $-Field={'*'}.  Thank you for leaving no stone unturned.

Regards,

Michael

Not applicable

Hi....

Only this way works for me...

Regards.

Not applicable

the

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

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

worked for me.

Pleased to find this right away, as I was struggling with displaying this info!

Not applicable

Not applicable

Hi,

this is how I did the Job:

  • Add an extra field to your load script:

    isnull(CostoVen) as isCostoVenNull

  • Define set analysis as follows:

    sum({$<isCostoVenNull={'-1'}>} Sales)

Cheers!