title: Filtering during CALCULATETABLE using values from another table (DAX)
body: <p>I have two tables in a Power BI workspace:</p>
  
  <p><code>Table 1</code> is derived from a query that extracts a list of orders and the products within them.</p>
  
  <pre><code>CustomerID    OrderID    ProductID    Country    Date
  0010234       9235064    V24-GY       UK         04/07/2018
  0010234       9235064    AB5-84       UK         04/07/2018
  0010234       9235064    RIM-3S       UK         04/07/2018
  0010234       4812623    V79-GY       UK         27/09/2018
  0049371       7924823    V24-GY       UK         09/10/2018
  0049371       7924823    59H-PW       UK         09/10/2018
  </code></pre>
  
  <p><code>Table 2</code> contains a list of unique <code>OrderID</code> values that included a certain product, <code>X</code> (e.g. <code>V24-GY</code>).  This was created using <code>SUMMARIZECOLUMNS</code> and applying a <code>FILTER</code> that searched for product <code>X</code> in Table 1</p>
  
  <pre><code>OrderID
  9235064
  7924823
  </code></pre>
  
  <p>I would like to use the <code>OrderID</code> values in <code>Table 2</code> as a filter for <code>Table 1</code> so that I can create a new table, <code>Table 3</code>.</p>
  
  <pre><code>CustomerID    OrderID    ProductID    Country    Date
  0010234       9235064    V24-GY       UK         04/07/2018
  0010234       9235064    AB5-84       UK         04/07/2018
  0010234       9235064    RIM-3S       UK         04/07/2018
  0049371       7924823    V24-GY       UK         09/10/2018
  0049371       7924823    59H-PW       UK         09/10/2018
  </code></pre>
  
  <p>I've tried to use <code>CALCULATETABLE</code> with <code>FILTER</code> but <code>Table 2</code> isn't recognized as a valid name/entity and so can't be used.</p>
  
  <p>How can I get to <code>Table 3</code>?</p>