title: count distinct values in one table based on values in another table power bi
body: <p>I would like to do a distinct count of values on one table based on fields defined in another table, i am able to achieve this easily using SQL statements but i am unable to convert it into DAX as is used on power BI measures. Here is the SQL that i would use to count;</p>
  
  <pre><code> SELECT COUNT (DISTINCT F.TAXPAYER_ID) 
   FROM DIM_TAXPAYER D, FACT_REGISTRATION F 
   WHERE D.TAXPAYER_ID = F.TAXPAYER_ID 
   AND D.IS_MIGRATED = 'Y' AND D.IPAGE_PROCESSED = 'Y' OR D.IS_MIGRATED = 'N';
  </code></pre>
  
  <p>Basically i want to count distinct taxpayer id's in the Fact_registration table that meet the criteria specified from the DIM_TAXPAYER table How can i convert this into a DAX expression?</p>