title: Distinct Count row in a table visual
body: <p>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.</p>
  <p>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:-</p>
  <pre><code>No. of State=CALCULATE(DISTINCTCOUNT(Table1['State']),'measure['spend %']&gt;0)
  </code></pre>
  <p>Error:
  A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.</p>
  <p><a href="https://i.stack.imgur.com/22bBc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/22bBc.png" alt="enter image description here" /></a></p>