Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting net value

Below is a data of three companys (ID), which all have random number of transactions (rows).

Now I would like to have a net value for each company - if one or more rows for that company equals 1, the net value for that company would be 1. If all the rows for the company are 0, the net value would be 0.

ID    Data

1     1

1     0

1     1

1     0

2     0

2     0

2     0

3     0

3     1

3     1

Int this case the net values for companies would be

ID     Net value

1     1

2     0

3     1

How can I count that net value? There must be a simple solution, just can't figure it out...

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

Use if(sum(trans)=0,0,1) as an expression in a chart ( straight table should work fine).

Group by ID and don't forget to uncheck "Suppress Zero-Values"...

View solution in original post

3 Replies
giakoum
Partner - Master II
Partner - Master II

Use if(sum(trans)=0,0,1) as an expression in a chart ( straight table should work fine).

Group by ID and don't forget to uncheck "Suppress Zero-Values"...

SunilChauhan
Champion
Champion

no need to keep sum also you can use below

If(Data=0,0,1)and uncheck Supress zero values in Presentation of chart properties

see the attached file

Sunil Chauhan
Not applicable
Author

Thanks - both of you. I was thinking this from the wrong end, I guess.