title: DAX Measure for SQL NOT EXISTS
body: <p>I would like to add an incremental refresh for one of our biggest transactional tables.
  This transactional table has this structure:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Order</th>
  <th>Value</th>
  <th>Index1</th>
  <th>Index2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>100</td>
  <td>5</td>
  <td>1</td>
  <td>0</td>
  </tr>
  <tr>
  <td>101</td>
  <td>5</td>
  <td>2</td>
  <td>0</td>
  </tr>
  <tr>
  <td>102</td>
  <td>6</td>
  <td>3</td>
  <td>0</td>
  </tr>
  <tr>
  <td>103</td>
  <td>2</td>
  <td>4</td>
  <td>0</td>
  </tr>
  <tr>
  <td>103</td>
  <td>3</td>
  <td>5</td>
  <td>4</td>
  </tr>
  <tr>
  <td>104</td>
  <td>4</td>
  <td>6</td>
  <td>0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <ul>
  <li>Order: The order number</li>
  <li>Value: The order value</li>
  <li>Index1: Row Index total</li>
  <li>Index2: Row Index, which should be replaced</li>
  </ul>
  <p>As you can see in order 103, there are two rows in (Index1: 4 &amp;5). The booking with Index1 = 5, is the correction booking. That means that the row with Index1= 4 should be filtered out.
  The SQL code I am using to filter all false entries is this one:</p>
  <pre><code>SELECT DBA1.Order,
         DBA1.Value  
  FROM   AZ.SC DBA1
  WHERE NOT EXISTS (SELECT * 
                         FROM   AZ.SC DBA2 
                         WHERE  DBA2.INDEX2 = DBA1.INDEX1) 
  </code></pre>
  <p>Since this SQL will not allow &quot;Query Folding&quot; which is necessary for PBI Incremental refresh, I need somehow an approach within a DAX Measure, that will filter also all false entries. But how?</p>
  <p>Please let me know if you need further information.</p>