title: Filter SUMMARIZECOLUMNS
body: <p>How to construct filter tables for <code>SUMMARIZECOLUMNS</code> function? </p>
  
  <p>The <a href="https://docs.microsoft.com/en-us/dax/summarizecolumns-function-dax" rel="nofollow noreferrer">SUMMARIZECOLUMNS</a> has the following pattern:</p>
  
  <pre><code>SUMMARIZECOLUMNS( 
      ColumnName1, ...
      ColumnNameN,
      FilterTable1,     -- my question concerns this line
      FilterTableN, 
      Name1, [measure1], 
      NameN, [measure2], 
  )
  </code></pre>
  
  <p>I have checked that the following 3 patterns work. They return the same results, at least for the simple sample data I used.</p>
  
  <pre><code>SUMMARIZECOLUMNS (
      T[col],
      FILTER( T, T[col] = "red" ) 
  )
  </code></pre>
  
  <pre><code>SUMMARIZECOLUMNS (
      T[col],
      CALCULATETABLE( T, T[col] = "red" ) 
  )
  </code></pre>
  
  <pre><code>SUMMARIZECOLUMNS (
      T[col],
      CALCULATETABLE ( T, KEEPFILTERS ( T[col] = "red" ) )
  )
  </code></pre>
  
  <p>Is any of these patterns superior over the other?</p>
  
  <p>Reference: <a href="https://www.sqlbi.com/articles/introducing-summarizecolumns/" rel="nofollow noreferrer">https://www.sqlbi.com/articles/introducing-summarizecolumns/</a></p>
  
  <h2>Update</h2>
  
  <p>I would be interested in an answer that contains a query plan analysis
  or link to credible source. I would be grateful if you mentioned
  using the SUMMARIZECOLUMNS function when grouping columns from
  multiple tables.</p>