<?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 create table using DAX (some questions on SUMMARIZE Function) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2763857#M85761</link>
    <description>&lt;P&gt;Yeah, thanks a lot&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 09:19:10 GMT</pubDate>
    <dc:creator>Bebs</dc:creator>
    <dc:date>2022-09-13T09:19:10Z</dc:date>
    <item>
      <title>How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2749896#M84813</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've a table (let's call it 'Table' &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;) with fields A, B, C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to create a new table with all values from A where B=1 and all values from A where C=2.&lt;/P&gt;&lt;P&gt;I'm trying to create a table using SUMMARIZE function :&lt;/P&gt;&lt;P&gt;NewTable = SUMMARIZE(Table,'Table'[A])&amp;nbsp; &amp;lt;= I've got all distinct values of A (which is a good start)&lt;/P&gt;&lt;P&gt;1) Now, how can I filter to keep only values from A field where 'Table'[B]=1 ? (What is the best efficient way ?)&lt;/P&gt;&lt;P&gt;2) Then I'll have to concatenate (union) with all values of A where C=2, what is the easiest / efficient way ? Am I forced to build to different tables then concatenate / append / union it or can I create it in one Dax command ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:45:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2749896#M84813</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-06T09:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2750267#M84831</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;Try something like the following:&lt;/P&gt;
&lt;P&gt;CALCULATETABLE(&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;VALUES( 'Table'[A] ),&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;'Table'[B] = 1,&lt;BR /&gt;'Table'[C] = 2&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;Let me know if that helps!&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 12:32:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2750267#M84831</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-09-06T12:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2750845#M84872</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;to precise one tricky point : i'd like to append all lines of both scenarios,&lt;/P&gt;&lt;P&gt;to illustrate this point&lt;/P&gt;&lt;P&gt;suppose the dataset is this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TABLE :&lt;/P&gt;&lt;P&gt;A, B, C&lt;/P&gt;&lt;P&gt;5,1,0&lt;/P&gt;&lt;P&gt;6,2,1&lt;/P&gt;&lt;P&gt;7,3,2&lt;/P&gt;&lt;P&gt;8,1,2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wanted result&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NEWTable:&lt;/P&gt;&lt;P&gt;A,BorC&lt;/P&gt;&lt;P&gt;5,1&lt;/P&gt;&lt;P&gt;8,1&lt;/P&gt;&lt;P&gt;7,2&lt;/P&gt;&lt;P&gt;8,2&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 15:42:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2750845#M84872</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-06T15:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2751040#M84877</link>
      <description>&lt;P&gt;Alright, this should do it&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Table = 
VAR _Table1 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[B]
        ),
    'Table'[B] = 1
    )
VAR _Table2 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[C]
        ),
    'Table'[C] = 2
    )
RETURN
    UNION( _table1, _Table2 )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Sep 2022 16:57:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2751040#M84877</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-09-06T16:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753147#M84989</link>
      <description>&lt;P&gt;Thanks, it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 12:40:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753147#M84989</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-07T12:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753259#M84998</link>
      <description>&lt;P&gt;One last question &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="213336" data-lia-user-login="PabloDeheza" class="lia-mention lia-mention-user"&gt;PabloDeheza&lt;/a&gt;&amp;nbsp;: is it possible to add a condition column, for example :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TABLE :&lt;/P&gt;&lt;P&gt;A, B, C&lt;/P&gt;&lt;P&gt;5,1,0&lt;/P&gt;&lt;P&gt;6,2,1&lt;/P&gt;&lt;P&gt;7,3,2&lt;/P&gt;&lt;P&gt;8,1,2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wanted result :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NEWTable:&lt;/P&gt;&lt;P&gt;A,BorC&lt;/P&gt;&lt;P&gt;5, 1, "FilterOne"&lt;/P&gt;&lt;P&gt;8, 1, "FilterOne"&lt;/P&gt;&lt;P&gt;7, 2 , "FilterTwo"&lt;/P&gt;&lt;P&gt;8, 2, "FilterTwo"&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:39:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753259#M84998</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-07T13:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753507#M85014</link>
      <description>&lt;P&gt;Sure, after all that you can just add a new column to the table with the following DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Filter = 
IF(
	'New Table'[B] = 1,
	"Filter One",
	"Filter Two"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 15:40:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2753507#M85014</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-09-07T15:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2761528#M85614</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="213336" data-lia-user-login="PabloDeheza" class="lia-mention lia-mention-user"&gt;PabloDeheza&lt;/a&gt; :&lt;/P&gt;&lt;P&gt;I've one last question :&lt;/P&gt;&lt;P&gt;I'm fighting with syntax &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;how can I Mix :&lt;/P&gt;&lt;PRE&gt;New Table = 
VAR _Table1 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[B]
        ),
    'Table'[B] = 1
    )
VAR _Table2 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[C]
        ),
    'Table'[C] = 2
    )
RETURN
    UNION( _table1, _Table2 )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;Filter = 
IF(
	'New Table'[B] = 1,
	"Filter One",
	"Filter Two"
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(That is say integrate the new manuel string column in the big table) ?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 10:01:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2761528#M85614</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-12T10:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2761848#M85632</link>
      <description>&lt;P&gt;To do all in one DAX the code would be this one:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Table = 
VAR _Table1 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[B]
        ),
    'Table'[B] = 1
    )
VAR _Table2 =
    FILTER(
        SUMMARIZE(
            'Table',
            'Table'[A],
            'Table'[C]
        ),
    'Table'[C] = 2
    )
RETURN
ADDCOLUMNS (
    UNION ( _table1, _Table2 ),
    "Filter", IF ( 'Table'[B] = 1, "Filter One", "Filter Two" )
)&lt;/LI-CODE&gt;
&lt;P&gt;Note that in the last line of code, the word "Filter" is the name of your new colunm, so it can be called as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 12:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2761848#M85632</guid>
      <dc:creator>PabloDeheza</dc:creator>
      <dc:date>2022-09-12T12:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create table using DAX (some questions on SUMMARIZE Function)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2763857#M85761</link>
      <description>&lt;P&gt;Yeah, thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 09:19:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-table-using-DAX-some-questions-on-SUMMARIZE/m-p/2763857#M85761</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-13T09:19:10Z</dc:date>
    </item>
  </channel>
</rss>

