title: Power BI (DAX): Distinct Count Filtered by Condition
body: <p>I have a data set with publishers with revenue by month. Publishers are considered to be "active" month if their revenue is equal or greater than 1000 for a given month.  </p>
  
  <p>Now, I want to count the distinct number of "active" publishers over a monthly trend using Power BI (DAX). </p>
  
  <p>Example Data Set</p>
  
  <p><a href="https://i.stack.imgur.com/p6pfN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/p6pfN.png" alt="Example Data Set"></a></p>
  
  <p>Here is a measure formula that I attempted: </p>
  
  <pre><code>DistCountActiveMonths = CALCULATE(DISTINCTCOUNT('Net Revenue Data'[Publisher Name]),FILTER('Net Revenue Data','Net Revenue Data'[Active Month]=1))
  </code></pre>
  
  <p>Please advise how to correct this formula to achieve the desired result, e.g.:</p>
  
  <p><a href="https://i.stack.imgur.com/5JCpu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5JCpu.png" alt="enter image description here"></a></p>