<?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 Table in DAX expression in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1597029#M32001</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;You're right this will not work in measure, i've used this as a Calculated table.&lt;BR /&gt;I missed you're point that you don't need a calculated table. So I'll let other folks provide you the solution, as I'm not aware about the same.&lt;/P&gt;&lt;P&gt;Will post my solution, when I'll get to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2021 11:56:24 GMT</pubDate>
    <dc:creator>AnkitKukreja</dc:creator>
    <dc:date>2021-01-13T11:56:24Z</dc:date>
    <item>
      <title>Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1588394#M31867</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;&lt;BR /&gt;I have the below dataset of products and store information. I would like to have a simple DAX Expression which returns Product and total sales.&lt;BR /&gt;&lt;BR /&gt;Main Dataset:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;City&lt;/TD&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;Product C&lt;/TD&gt;&lt;TD&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TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I don't mind writing hardcoded values for the Product. Basically, I would like to write some DAX expression like&lt;BR /&gt;&lt;BR /&gt;Create new table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;gt; Add row ( "Product A", Sum(ProductA),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;gt;&amp;nbsp;Add row ( "Product B", Sum(ProductB)&lt;BR /&gt;&lt;BR /&gt;Return Table.&lt;BR /&gt;&lt;BR /&gt;I don't want to create a separate calculated table as it doesn't sync with the main dataset on using a filter so looking to created Dax expression which will return the table and also remains in sync with the main dataset so whenever the filters are changed my values in the Dax table also changes.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2021 03:16:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1588394#M31867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-09T03:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1588538#M31872</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;This seems quite straight forward, please go into query editor and select your product columns and unpivot them,&lt;BR /&gt;you'll get a desired result and for this you might not require dax as well, just drag the columns and it would sum up your data or you can use measure as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Ankit Kukreja&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/ankit-kukreja1904" target="_blank"&gt;www.linkedin.com/in/ankit-kukreja1904&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2021 14:45:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1588538#M31872</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-01-09T14:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1589361#M31893</link>
      <description>&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying. In my case the unpivot option won't work so looking for a measure option here which returns the product and it's total. Will be great if you can tell me the DAX expression for the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 07:45:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1589361#M31893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-11T07:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1589651#M31901</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Not sure what you were looking for exactly, but unpivot would be the best approach considering the scenario you have shared here. But, if you've some other requirements, then please use below dax for getting the same results.&lt;/P&gt;&lt;P&gt;Sales by Product =&lt;/P&gt;&lt;P&gt;UNION(&lt;/P&gt;&lt;P&gt;SELECTCOLUMNS( 'Table (2)' , "Product A" , "Product A" , "Sales" , 'Table (2)'[Product A] ),&lt;/P&gt;&lt;P&gt;SELECTCOLUMNS( 'Table (2)' , "Product B" , "Product B" , "Sales" , 'Table (2)'[Product B] ),&lt;/P&gt;&lt;P&gt;SELECTCOLUMNS( 'Table (2)' , "Product C" , "Product C" , "Sales" , 'Table (2)'[Product C] ),&lt;/P&gt;&lt;P&gt;SELECTCOLUMNS( 'Table (2)' , "Product D" , "Product D" , "Sales" , 'Table (2)'[Product D] )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ankit Kukreja&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/ankit-kukreja1904" target="_blank"&gt;www.linkedin.com/in/ankit-kukreja1904&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 11:16:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1589651#M31901</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-01-11T11:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1595174#M31971</link>
      <description>&lt;P&gt;Hi Ankit,&lt;BR /&gt;&lt;BR /&gt;I tried above formula and it gave me the error viz.&amp;nbsp;The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.&lt;BR /&gt;&lt;BR /&gt;Did you tried this dax in your test pbix ?IF so, can you please upload the sample pbix ?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 20:04:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1595174#M31971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-12T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1595179#M31972</link>
      <description>&lt;P&gt;Select columns will return only one column so this won't work in this situation&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dax/selectcolumns-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/selectcolumns-function-dax&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 20:07:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1595179#M31972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-12T20:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1597029#M32001</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;You're right this will not work in measure, i've used this as a Calculated table.&lt;BR /&gt;I missed you're point that you don't need a calculated table. So I'll let other folks provide you the solution, as I'm not aware about the same.&lt;/P&gt;&lt;P&gt;Will post my solution, when I'll get to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 11:56:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1597029#M32001</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-01-13T11:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1611605#M32393</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;I believe calculate table or unpivot is the only option according to me.&lt;/P&gt;&lt;P&gt;Let's see if we can get any other solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 15:34:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1611605#M32393</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-01-20T15:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1621456#M32716</link>
      <description>&lt;P&gt;Calculate table will have an issue of static data. Because it won't have dynamic data. Unpivot is also a one-time solution and the same challenge of static data. Thanks, Ankit for looking into though.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:45:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1621456#M32716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-25T15:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table in DAX expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1621590#M32720</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, unpivot would be added as a step in your query editor and it would update as your data is updated everytime. Just thinking it out loud, if you might have missed that point.&lt;BR /&gt;Anyways, thanks and good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 16:49:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Table-in-DAX-expression/m-p/1621590#M32720</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-01-25T16:49:53Z</dc:date>
    </item>
  </channel>
</rss>

