Forum Discussion

bsantos96's avatar
bsantos96
Copper Contributor
Feb 22, 2021

Count Duplicates values using subtotal function

Hi everyone,

I need help to count different values on a column based on a filter (dinamic).

Ex: I have a Year (Ano) column. On the picture below this column has 3 differents values.

But when I filter any other column, this amount can change.

Ex: Now i have just 2 differents values.

Does anyone knows how to calculate this? I try to use the subtotal function, but didn't work. 

I appreciate any help.

Thanks guys.

 

2 Replies

    • bsantos96's avatar
      bsantos96
      Copper Contributor

      Hi SergeiBaklan. Thanks for the help!

       

      I think didn't explain very well. Sorry. 

      I'm trying to Sum the column "V.Total" but because there's 3 years for example, the values of "V.Total" is adding up 3 times. So I'm trying to count how many different values there's in column "Ano" to calculate the sum of column "V.Total".

      Ex: There's 3 differents values on column "Ano" to the same row. So I'll add another column Total = V.Total/3. When I sum the column Total, the result will be correct.

      If you think another way to solve this I also accept.

       

      Thanks!

       

Resources