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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count field name form positive value

Hi Master QS.

I have some problem to make set analytic.

Data 1.PNG

From Data 1 how Qlik Sense count Name based on the sum Value but only positive sum of Value are calculated??

Please advise..

Thanks.

7 Replies
reddy-s
Master II
Master II

Hi Mrdee,

count(Name) should work just fine even if there are negative values. If the problem still persists a sample qvf will be very helpful.

Thanks,

Sangram

tresesco
MVP
MVP

Try like:

Count(Distinct {<Name={"=Sum(Value)>0"}>}Name)

Anonymous
Not applicable
Author

may be this as well without Set analysis?

=If(Value>0, Count(Name) or Count(distinct(Name)))

reddy-s
Master II
Master II

And if aonly positive values need to be counted:

try this:

count({$< Value = {">0"} >}Name)

sunny_talwar

Maybe 0 should also be included:

=Count(Distinct {<Name={"=Sum(Value)>=0"}>}Name)

tresesco
MVP
MVP

Was asked for 'positive' and zero (0) is not a positive number.

Not applicable
Author

Thanks all,

It helpfully.