Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
theresaa
Contributor III
Contributor III

Set Analysis question - empty result set

Example Data:

If I want to display the count of Units with a status of 'OK' in a text box, I use:

=count(distinct {<Status = {'OK'}>}UnitNumber)  and the result in the text box is 3

and it works fine.

But - if the user were to click on the word 'Bad' in the above table box, the result in the text box remains at 3, when it should be 0.

If the user were to click on the UnitNumber of 00003, it calculates correctly at 0

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe

count(distinct {<Status = {'OK'}>*<Status =P(Status)>}UnitNumber)

View solution in original post

7 Replies
sunny_talwar

Try this expression instead of the one you have.

=Count(DISTINCT {<Status -= {'Bad'}>} UnitNumber)

maxgro
MVP
MVP

maybe

count(distinct {<Status = {'OK'}>*<Status =P(Status)>}UnitNumber)

theresaa
Contributor III
Contributor III
Author

Is the -= meaning NOT EQUAL?  It is working this way.

theresaa
Contributor III
Contributor III
Author

Thank You.  This solution works as well.  The 'P' suggests it looks for all possible values of Status?

sunny_talwar

'-=' means count everywhere in your current selection where Status is not 'Bad'

HTH

Best,

Sunny

maxgro
MVP
MVP

P possible, * intersection

more detail in the QlikView help or

Set Analysis: syntaxes, examples

theresaa
Contributor III
Contributor III
Author

Thank You.  I will use your solution, because it is possible in our live data that there could be more than 2 status values, and your solution will also work in that situation.

Thanks very much again.