<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: summarize vs addcolumn in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/795105#M4668</link>
    <description>&lt;P&gt;In reality this would the the best one:&lt;/P&gt;&lt;PRE&gt;SUMMARIZECOLUMNS (
    TableO[field1],
    tableY'[field3],
    "duration", [field5]
)&lt;/PRE&gt;&lt;P&gt;And if you cannot use SUMMARIZECOLUMNS then:&lt;/P&gt;&lt;PRE&gt;ADDCOLUMNS (
    SUMMARIZE (
        TableX,
        TableO[field1],
        tableY[field3]
    ),
    "duration", [field5]
)&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 Sep 2019 00:59:06 GMT</pubDate>
    <dc:creator>marcorusso</dc:creator>
    <dc:date>2019-09-18T00:59:06Z</dc:date>
    <item>
      <title>summarize vs addcolumn</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/794625#M4651</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;The following two queries give the same result.&lt;BR /&gt;Which is the best to use and why?&lt;BR /&gt;I feel like summarize is simpler for me to use.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADDCOLUMNS (&lt;BR /&gt;GROUPBY (&lt;BR /&gt;'TableX'&lt;BR /&gt;,'TableO'[field1]&lt;BR /&gt;,'tableY'[field3]&lt;BR /&gt;)&lt;BR /&gt;,&lt;BR /&gt;"duration", 'TableX'[field5]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;////////////////////////////////////&lt;/P&gt;&lt;P&gt;SUMMARIZE(&lt;BR /&gt;'TableX'&lt;BR /&gt;,'TableO'[field1]&lt;BR /&gt;,'tableY'[field3]&lt;BR /&gt;, "duration", 'TableX'[field5]&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:28:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/794625#M4651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-17T14:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: summarize vs addcolumn</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/794923#M4661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a good blog by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="41" data-lia-user-login="marcorusso" class="lia-mention lia-mention-user"&gt;marcorusso&lt;/a&gt;&amp;nbsp; who is the guy to ask!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;His conclusion is below.&amp;nbsp; There are a ton of books and blogs to answser other questions like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The conclusion is that&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;extended columns in a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/summarize/" target="_blank"&gt;SUMMARIZE&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expression should not be moved out to an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/addcolumns/" target="_blank"&gt;ADDCOLUMNS&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;if the table used in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/summarize/" target="_blank"&gt;SUMMARIZE&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;has particular filters and the extended column expression uses columns that are not part of the output&lt;/STRONG&gt;&lt;SPAN&gt;. Even though you can create an equivalent&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/addcolumns/" target="_blank"&gt;ADDCOLUMNS&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;query, the result is much more complex and there are no performance benefits in this refactoring. The more complex query has the exact same (not so good) performance as the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dax.guide/summarize/" target="_blank"&gt;SUMMARIZE&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;query – both queries in this section require almost 20 seconds to run on Adventure Works 2012 Tabular.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 20:26:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/794923#M4661</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-09-17T20:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: summarize vs addcolumn</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/795105#M4668</link>
      <description>&lt;P&gt;In reality this would the the best one:&lt;/P&gt;&lt;PRE&gt;SUMMARIZECOLUMNS (
    TableO[field1],
    tableY'[field3],
    "duration", [field5]
)&lt;/PRE&gt;&lt;P&gt;And if you cannot use SUMMARIZECOLUMNS then:&lt;/P&gt;&lt;PRE&gt;ADDCOLUMNS (
    SUMMARIZE (
        TableX,
        TableO[field1],
        tableY[field3]
    ),
    "duration", [field5]
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2019 00:59:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summarize-vs-addcolumn/m-p/795105#M4668</guid>
      <dc:creator>marcorusso</dc:creator>
      <dc:date>2019-09-18T00:59:06Z</dc:date>
    </item>
  </channel>
</rss>

