<?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: Dynamic virtual summarized table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2319406#M57898</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="320777" data-lia-user-login="v-chenwuz-msft" class="lia-mention lia-mention-user"&gt;v-chenwuz-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, that is very close to what I wanted. I made some changes to your DAX to make the summarize table become more dynamic inside a SUMX function as below (I added in a simple volume table). The measure below will give me dynamic calculation of total cost based on the filter context from&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Periods[PeriodName] and&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Scenarlo[ScenarloName]&lt;/SPAN&gt;&lt;/DIV&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMMARIZE TABLE 2 = 

SUMX(
    SUMMARIZE(
        'Cost',
        Periods[PeriodName],
        Scenarlo[ScenarloName],
        "Amount", 
        VAR _Cost = SUM(Cost[Cost])
        VAR _Volume = SUM(Volume[Volume])
        RETURN 
        _Cost * _Volume
    ),
    [Amount]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is whether the above DAX code has any issue? Because it is summarizing based on "Cost" table, but Im bringing in data from Volume table, so Im not sure if Im doing the right thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial thought was to have the dynamic Summarized table something similar to the SUMMARIZECOLUMNS, that I'm not summarizing any particular table, but bringing in fields from dimensions tables only to create the measure.&amp;nbsp; The SUMMARIZECOLUMN static table would look something like below.&amp;nbsp;But it does not work with SUMMARIZE function because SUMMARIZE needs to have first argument as a table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMMARIZECOLUMNS table = 
SUMMARIZECOLUMNS(
    Scenarlo[ScenarloName],
    Periods[PeriodName],
    "Total Amount",
    VAR _Cost = SUM(Cost[Cost])
    VAR _Volume = SUM(Volume[Volume])
    RETURN _Cost * _Volume
)
    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Feb 2022 00:41:34 GMT</pubDate>
    <dc:creator>duybachhpvn</dc:creator>
    <dc:date>2022-02-07T00:41:34Z</dc:date>
    <item>
      <title>Dynamic virtual summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2309989#M57384</link>
      <description>&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Hi, is there a way to write a DAX measure to obtain a dynamic virtual table that will give me the desire result as in below scenario?&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Basically the result I would want is the final Dynamic virtual table from rows 21 to 28, which can be dynamically filtered accordingly to visual filter context. If I have a visual (lets say a matrix table), and at one cell in that visual is Period 2022-Q1, I can have a table variable that changes accordingly to current filter context (which means I get rows 22 to 24) in that filter context.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I tried to use SUMMARIZE, but it does not allow me to bring in columns from 2 different tables in 1 measure. I also tried SUMMARIZECOLUMNS but it cannot result in a dynamic virtual table that will change according to the filter context within the visual.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 06:36:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2309989#M57384</guid>
      <dc:creator>duybachhpvn</dc:creator>
      <dc:date>2022-01-31T06:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic virtual summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2310023#M57387</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="269021" data-lia-user-login="duybachhpvn" class="lia-mention lia-mention-user"&gt;duybachhpvn&lt;/a&gt; , You can not create a dynamic calculated table. Tables once created will be static. So your measures will not change based on slicer values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want add measures of another tables try like, in var of measures&amp;nbsp; (that will be dynamic&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;measure ,&lt;/P&gt;
&lt;P&gt;var _tab = addcolumns(summarize(Table, 'Common Dim1'[Column], , 'Common Dim2'[Column] ), "_1", [Measure1]&lt;/P&gt;
&lt;P&gt;,"_2", [Meausre 2] )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add columns in summarize or addcolumns as per need&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 07:02:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2310023#M57387</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-31T07:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic virtual summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2319374#M57897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="269021" data-lia-user-login="duybachhpvn" class="lia-mention lia-mention-user"&gt;duybachhpvn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tables we create (new tables) are static and cannot be created dynamically.&lt;/P&gt;
&lt;P&gt;But &lt;SPAN&gt;SUMMARIZE can create&amp;nbsp;a dynamic virtual table from two table, but the table can not be return. Let me prove it to you.&lt;BR /&gt;Before doing so, create a relationship between these tables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I create a measure to return which is the result of summarize.&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;SUMMARIZE TABLE = 
var _1 = SUMMARIZE('Cost',[PeriodName],[ScenarloName],[Cost])
return
CONCATENATEX(_1,[PeriodName] &amp;amp;" "&amp;amp;[ScenarloName]&amp;amp;" "&amp;amp;[Cost],"
")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;result:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pbix in the end you can refer.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 08:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2319374#M57897</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-02-04T08:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic virtual summarized table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2319406#M57898</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="320777" data-lia-user-login="v-chenwuz-msft" class="lia-mention lia-mention-user"&gt;v-chenwuz-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, that is very close to what I wanted. I made some changes to your DAX to make the summarize table become more dynamic inside a SUMX function as below (I added in a simple volume table). The measure below will give me dynamic calculation of total cost based on the filter context from&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Periods[PeriodName] and&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Scenarlo[ScenarloName]&lt;/SPAN&gt;&lt;/DIV&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMMARIZE TABLE 2 = 

SUMX(
    SUMMARIZE(
        'Cost',
        Periods[PeriodName],
        Scenarlo[ScenarloName],
        "Amount", 
        VAR _Cost = SUM(Cost[Cost])
        VAR _Volume = SUM(Volume[Volume])
        RETURN 
        _Cost * _Volume
    ),
    [Amount]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is whether the above DAX code has any issue? Because it is summarizing based on "Cost" table, but Im bringing in data from Volume table, so Im not sure if Im doing the right thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial thought was to have the dynamic Summarized table something similar to the SUMMARIZECOLUMNS, that I'm not summarizing any particular table, but bringing in fields from dimensions tables only to create the measure.&amp;nbsp; The SUMMARIZECOLUMN static table would look something like below.&amp;nbsp;But it does not work with SUMMARIZE function because SUMMARIZE needs to have first argument as a table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SUMMARIZECOLUMNS table = 
SUMMARIZECOLUMNS(
    Scenarlo[ScenarloName],
    Periods[PeriodName],
    "Total Amount",
    VAR _Cost = SUM(Cost[Cost])
    VAR _Volume = SUM(Volume[Volume])
    RETURN _Cost * _Volume
)
    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 00:41:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-virtual-summarized-table/m-p/2319406#M57898</guid>
      <dc:creator>duybachhpvn</dc:creator>
      <dc:date>2022-02-07T00:41:34Z</dc:date>
    </item>
  </channel>
</rss>

