Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
reddys310
Honored Contributor II

Re: Count field name form positive value

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

MVP
MVP

Re: Count field name form positive value

Try like:

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

balrajahlawat
Esteemed Contributor

Re: Count field name form positive value

may be this as well without Set analysis?

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

reddys310
Honored Contributor II

Re: Count field name form positive value

And if aonly positive values need to be counted:

try this:

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

Re: Count field name form positive value

Maybe 0 should also be included:

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

MVP
MVP

Re: Count field name form positive value

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

Not applicable

Re: Count field name form positive value

Thanks all,

It helpfully.

Community Browser