Forum Discussion

adaocabelo's avatar
adaocabelo
Frequent Visitor
7 years ago
Solved

Restricting Values for Total

Hi guys, I'm having some difficulties to have the totals on my report.

 

I have a table which has several repeated rows, as the example bellow:

 

Product - Value

P1 - $500,00

P1 - $500,00

P1 - $500,00

P1 - $500,00

P1 - $500,00

P2 - $300,00

P2 - $300,00

P2 - $300,00

P2 - $300,00

P3 - $800,00

P3 - $800,00

Total = $5300,00

 

So far I have the right total, since it's using all rows to sum, but I need to sum the values only once per product, then, the right total is $1600,00.

 

I've made this measure to calculate:

Measure = IF(opaRametro[opaRametro Value]=0; DIVIDE(value;COUNT(Product)))

and the result was this:

 

Product - Value

P1 - $500,00

P2 - $300,00

P3 - $800,00

Total - $481,81

 

Instead of adding the values of this, the system is dividing the total of the original column and dividing per the original number of rows: $5300,00/11 = $481,81.

 

How should I resolve this?

8 Replies