Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Honored Contributor II

Counting net value

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"...

3 Replies
giakoum
Honored Contributor II

Counting net value

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"...

chauhans85
Esteemed Contributor

Re: Counting net value

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

Not applicable

Counting net value

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

Community Browser