<?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: How to generate a new table base on some conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762844#M146828</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for your quick reply!&lt;/P&gt;&lt;P&gt;I'm really sorry that I missed one very important point in condition2 in the original post:&lt;BR /&gt;&lt;SPAN&gt;2. Only the sum of AMT for GEOGRAPHY.02 SUPER REGION and&amp;nbsp;PRODUCT LINE is not 0 should show in this table2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(The AMT should be based on both&amp;nbsp;GEOGRAPHY.02 SUPER REGION and&amp;nbsp;PRODUCT LINE level)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 08:11:52 GMT</pubDate>
    <dc:creator>Tracy000</dc:creator>
    <dc:date>2024-03-14T08:11:52Z</dc:date>
    <item>
      <title>How to generate a new table base on some conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762641#M146811</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day, I got a problem which need your kind advice, thanks in advance.&lt;/P&gt;&lt;P&gt;I have a table1 in Power BI, the data is as following:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Now I want to create another table (table2) base on table1, but only select few data base on conditions 1 &amp;amp; 2:&lt;BR /&gt;1. Only select these 4 columns data: GEOGRAPHY.03 MARKET, FISCAL TIME.04 FISCAL MONTH, PRODUCT LINE, AMT&lt;BR /&gt;2. Only the sum of AMT for GEOGRAPHY.02 SUPER REGION is not 0 should show in this table2&lt;BR /&gt;so this means only row 9-13 meet this condition, because row 1-8 sum AMT for SUPER REGION Asia Pacific is 0, although row 13 contains 0, but sum of AMT for Americas is not 0.&lt;BR /&gt;&lt;BR /&gt;So finally I would like to generate the table 2 like following:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 07:21:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762641#M146811</guid>
      <dc:creator>Tracy000</dc:creator>
      <dc:date>2024-03-14T07:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a new table base on some conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762685#M146813</link>
      <description>&lt;P&gt;bhi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="623680" data-lia-user-login="Tracy000" class="lia-mention lia-mention-user"&gt;Tracy000&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try below code for new table it might work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;newtable=
calculatetable(
 summarize(
    table1[geography.03market],
    table1[fiscaltime.04fiscalmonth],
    table1[productline],
    table1[amt]
 ),
 filter(
    values(table1[GEOGRAPHY.02 SUPER REGION]),
    sum(table1[amt])&amp;gt;0
 )
)&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;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 07:35:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762685#M146813</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-03-14T07:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a new table base on some conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762844#M146828</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a lot for your quick reply!&lt;/P&gt;&lt;P&gt;I'm really sorry that I missed one very important point in condition2 in the original post:&lt;BR /&gt;&lt;SPAN&gt;2. Only the sum of AMT for GEOGRAPHY.02 SUPER REGION and&amp;nbsp;PRODUCT LINE is not 0 should show in this table2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(The AMT should be based on both&amp;nbsp;GEOGRAPHY.02 SUPER REGION and&amp;nbsp;PRODUCT LINE level)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 08:11:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3762844#M146828</guid>
      <dc:creator>Tracy000</dc:creator>
      <dc:date>2024-03-14T08:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a new table base on some conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3763077#M146841</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Seems I got the result I want.&lt;/P&gt;&lt;P&gt;Added a variable to keep the filters and then applied to table2 as you suggested above.&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;var table1 = SUMMARIZECOLUMNS([GEOGRAPHY.02 SUPER REGION], [PRODUCT LINE], "SUMAMT", sum([amt]))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 09:29:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-generate-a-new-table-base-on-some-conditions/m-p/3763077#M146841</guid>
      <dc:creator>Tracy000</dc:creator>
      <dc:date>2024-03-14T09:29:11Z</dc:date>
    </item>
  </channel>
</rss>

