Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using isnull() in set analysis

Hello:

I have an expression using an if statement that I'd like turned into a set analysis statement.

I have two dimensions (store and checknum) and a measure (qty).

I want to show a count of the number of checknums that are null, listed by store.

The following if statement in an expression works, but only when I include the checknum as a dimension

if(isnull(qty)=-1,count(checknum))

if I only have [store] as a dimension, it returns the count of all checknum for that store, since at least one checknum per store has a null.

I would think that this set analysis expression would work, but it is not.  count({<if(isnull(qty)={-1}>},checknum)  it's saying the syntax is wrong, and returning no results.

Thanks

store checknum isnull(qtY) if(isnull(qty)=-1,count(checknum)) count({<if(isnull(qty)={-1}>},checknum)

-1 17
aaa1-1
aaa2-1
aaa3-1
aaa4-11
aaa5-1
aaa6-1
aaa7-1
aaa8-1
aaa9-1
bbb10-1
bbb11-1
bbb12-11
bbb13-1
bbb14-1
bbb15-11
bbb16-1
bbb17-1
3 Replies
Anonymous
Not applicable
Author

use  this  expression

count({$<qty={"*"}>}checknum)

Not applicable
Author

Using   count({$<qty={"*"}>}checknum)  returns the count of checknum when qty is NOT null.  I want to see the count of checknum when qty IS null.

I could do the following, which works, but it seems like its an extra step:

count ({$}checknum) - count({$<qty={"*"}>}checknum)

Thanks

Anonymous
Not applicable
Author

Maybe this:

count({$<qty-={"*"}>}checknum)