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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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)

tresB
Champion III
Champion III

May be like:

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

Not applicable
Author

Try this...

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