I want to create a measure which counts the no of rows in a table visual in my dashboard. I have the below visual table which keeps changing as you change the filter, I want to create a dynamic measure which will count the no. of rows in the table every time the filter is changed. So Basically I want to count the no of states in the table each time.
I am trying to use the DISTINCTCOUNT formula with a measure already used as a filter in the table but its giving an error Code:-
No. of State=CALCULATE(DISTINCTCOUNT(Table1['State']),'measure['spend %']>0)
Error: A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.