<?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: Aggr function with column return from temp table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234697#M118846</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It work, however I'm curious why my code didn't work ? temp table was defined already but dax still said "&lt;SPAN&gt;Cannot find table 'temp'"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2023 03:24:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-15T03:24:12Z</dc:date>
    <item>
      <title>Aggr function with column return from temp table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234614#M118842</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a newbie in DAX, in my lab I try to use SUMX function to sum all premium fee group by industry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My DAX function is below:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EVALUATE
	var temp = 
	FILTER(
		SUMMARIZE(
			Premium_table,
			Premium_table[Industry],
			Premium_table[SUM PREMIUM]
			),
			
	[SUM PREMIUM] &amp;gt; 10000)
 
	RETURN 
		ADDCOLUMNS( 
			temp, 
			"sum_groupby_Industry" , SUMX(temp, temp[SUM PREMIUM])
		
		
		)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried with DAX studio, it failed with log "Query (15, 40) Cannot find table 'temp' , I think I have defined temp table in above already , could you please assist on my issue ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 02:55:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234614#M118842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-15T02:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function with column return from temp table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234644#M118843</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please try the below whether it provides the desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;new addco table =
VAR temp =
    FILTER (
        SUMMARIZE ( Premium_table, Premium_table[Industry], Premium_table[SUM PREMIUM] ),
        [SUM PREMIUM] &amp;gt; 10000
    )
RETURN
    ADDCOLUMNS (
        temp,
        "sum_groupby_Industry", SUMX ( temp, Premium_table[SUM PREMIUM] )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 May 2023 03:05:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234644#M118843</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-05-15T03:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function with column return from temp table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234697#M118846</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It work, however I'm curious why my code didn't work ? temp table was defined already but dax still said "&lt;SPAN&gt;Cannot find table 'temp'"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 03:24:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234697#M118846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-15T03:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function with column return from temp table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234754#M118850</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your message.&lt;/P&gt;
&lt;P&gt;In my opinion, the below part was the cause, so I changed to the original table name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;temp is a virtual table that is created inside the formula, but when creating it, it used the original column name ( Premium_table[SUM PREMIUM] ) in SUMMARIZE function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 04:23:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Aggr-function-with-column-return-from-temp-table/m-p/3234754#M118850</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-05-15T04:23:59Z</dc:date>
    </item>
  </channel>
</rss>

