Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Empty subset


Hi,

I am doing some basic set analyis things but I am not able to find a solution for this problem. I am just calculating a sum over a subset of the current selection:

Sum({$<Check={'Y'}>} SumField)

Basically this works fine, but when there is no value Check='Y' in the current selection, the expression calcualtes the sum of all values in SumField. How can I change this expression so it returns zero in that case?

Thanks for your help

4 Replies
petter
Partner - Champion III
Partner - Champion III

Maybe:

RangeSum(Sum({$<Check={'Y'}>} SumField),0)

Not applicable
Author

Hi,

Try this:

=NumSum(Sum({$<Check={'Y'}>} SumField),0)

tresesco
MVP
MVP

May be like:

              Sum({$<Check * = {'Y'}>} SumField)

Not applicable
Author

Try this...

if( Check = 'Y', Sum({$<Check={'Y'}>} SumField), 0)