Feb 22 2021 05:48 AM
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.
Feb 22 2021 06:05 AM
You need helper column which returns 0 for hided rows, otherwise 1
Formula for the Helper is
=AGGREGATE(3,5,[@Ano])
With it counting on filtered table returns
Feb 22 2021 07:00 AM
Hi @Sergei Baklan. 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!