<?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: Summary table from VAR temporary table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127491#M163918</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="604138" data-lia-user-login="leolapa_br" class="lia-mention lia-mention-user"&gt;leolapa_br&lt;/a&gt;&amp;nbsp;Use GROUPBY with SUMX( CURRENTGROUP(), [@Days] )&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 19:17:25 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-08-30T19:17:25Z</dc:date>
    <item>
      <title>Summary table from VAR temporary table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127468#M163916</link>
      <description>&lt;P&gt;I have produced the following VAR (temporary) table called &lt;FONT color="#003300"&gt;&lt;STRONG&gt;'&lt;SPAN&gt;Tabela_CP_DiasxValor_DiasPeso_Dias&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#003300"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;with 300+ rows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I need is to come up with another VAR table that basically summarizes the vendors column highlighted to the left and group them so I get on a second column the total of "@Dias" highlighted to the right for each vendor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried doing that with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR Tabela_CP_DiasporForn = 
	SUMMARIZE(
		Tabela_CP_DiasxValor_DiasPeso_Dias,
		[Código - Nome do fornecedor],
		"@DiasSoma", SUMX(Tabela_CP_DiasxValor_DiasPeso_Dias, [@Dias])
	)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I end up getting is the summarized table (100+ rows, which is correct) but with the overall total of "@Dias" instead of the total by row/vendor:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I tried going with SUM instead of SUMX but DAX won't take the [@Days] column since it comes from the previous VAR table, and CALCULATE produces the same outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get that done? Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 18:41:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127468#M163916</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2024-08-30T18:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Summary table from VAR temporary table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127491#M163918</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="604138" data-lia-user-login="leolapa_br" class="lia-mention lia-mention-user"&gt;leolapa_br&lt;/a&gt;&amp;nbsp;Use GROUPBY with SUMX( CURRENTGROUP(), [@Days] )&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 19:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127491#M163918</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-08-30T19:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Summary table from VAR temporary table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127504#M163919</link>
      <description>&lt;P&gt;GROUPBY is cleaner but another option would be to filter Tabela inside the SUMX.&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;VAR Tabela_CP_DiasporForn =
ADDCOLUMNS (
    SUMMARIZE ( Tabela_CP_DiasxValor_DiasPeso_Dias, [Código - Nome do fornecedor] ),
    "@DiasSoma",
        VAR _Codigo = [Código - Nome do fornecedor]
        RETURN
            SUMX (
                FILTER (
                    Tabela_CP_DiasxValor_DiasPeso_Dias,
                    [Código - Nome do fornecedor] = _Codigo
                ),
                [@Dias]
            )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 19:43:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summary-table-from-VAR-temporary-table/m-p/4127504#M163919</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2024-08-30T19:43:24Z</dc:date>
    </item>
  </channel>
</rss>

