title: Power BI - I need a "countif" formula to look at unique entries in row/column
body: <p>I have only been working in Power BI for a little over one week now, and now I have run into my first problem.. </p>
  
  <p>I need a way to do the same as in below Excel formula..</p>
  
  <p>In Power Bi I have ONE table.
  I want to count unique "Split Orders" in column "B"</p>
  
  <p>But I only want to count them once..
  So the first time it is found, it is counted as 1
  Next I see it it is counted as 2 or 3 or 4 or more..</p>
  
  <p>So formula says "if counted MORE than once, then return "X", else return "1"
  And the IF statement then says if higher than 1, return 0 else return 1</p>
  
  <p>I have many thousands of rows and I need to identify each as either unique or not..
  But I can't seem to find the right combo of DAX formulas to do so.
  I have looked at <code>COUNTDISTINCT, CALCULATE, FILTERS, COUNTROWS</code>, and many more.
  They might be the right ones to use but I haven’t managed to find the right syntax.</p>
  
  <p>Many of the DAX formulas I have tried, either return ONLY "1" or ONLY "0" or they return the total amount of unique orders..</p>
  
  <p>Excel formula:</p>
  
  <pre><code>Row 2 = IF(B2="";0;IF(COUNTIF(B$1:$B2;B2)&gt;1;0;1))
  Row22 = IF(B22="";0;IF(COUNTIF(B$1:$B22;B22)&gt;1;0;1))
  Row32 = IF(B32="";0;IF(COUNTIF(B$1:$B32;B32)&gt;1;0;1))
  </code></pre>