Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Counting NULL Values

I'm trying to count NULL values using Set Analysis. I basically use this code:

Count({$<[EagleFeedback.Win/Loss]={}>} [EagleFeedback.Win/Loss])

It never returns any values even though I know there are some.

How do I use Set Analysis to count NULL values?

16 Replies
Anonymous
Not applicable
Author

How about:

SUM(-ISNULL([EagleFeedback.Win/Loss]))

I was having the same problem and this is what I ended up with. Set Analysis is very finicky about null values.

Hope this helps anyone else.

erjohnso
Creator
Creator

If your EagleFeedback.Win/Loss carries only 'Win', 'Loss' or NULL values, try this:


Count({$-1<[EagleFeedback.Win/Loss]={'Win','Loss'}>} [EagleFeedback.Win/Loss])

antoniotiman
Master III
Master III

You can Try :

Count({[EagleFeedback.Win/Loss]-={'*'}>} [EagleFeedback.Win/Loss)      (or -={*})

lars_plenge
Partner - Contributor III
Partner - Contributor III


You can use:


count({$<Customer={"=isnull(Address)"}>} Customer)

Not applicable
Author

antoniotiman
Master III
Master III

Hi Dave,

what is the origin of your data ?

DB or Load ?

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

in my experience I can tell you that probably the only option with set analysis that will work for you is similar to what the blog suggested by Eugenio says:

Count({1 - <[EagleFeedback.Win/Loss]={'*'}>} [EagleFeedback.Win/Loss])


Otherwise, you can use NULLASVALUE in script in order to assign a string/numeric default value for nulls:


NULLASVALUE [EagleFeedback.Win/Loss];

Set NullValue = 'N/A';

regards