<?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 how to summarize several columns into a new table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606960#M32253</link>
    <description>&lt;P&gt;I have data in in this format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1, column2, column3&lt;/P&gt;&lt;P&gt;0, 1, 1&lt;/P&gt;&lt;P&gt;1, 1, 1&lt;/P&gt;&lt;P&gt;1, 0, 1&lt;/P&gt;&lt;P&gt;1, 0, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I summarize the data into a new table where the first&lt;/P&gt;&lt;P&gt;column contains the column name from above,&lt;/P&gt;&lt;P&gt;and the second column contains the sum for each column above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1, 3&lt;/P&gt;&lt;P&gt;column2, 2&lt;/P&gt;&lt;P&gt;column3, 4&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 00:32:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-19T00:32:14Z</dc:date>
    <item>
      <title>how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606960#M32253</link>
      <description>&lt;P&gt;I have data in in this format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1, column2, column3&lt;/P&gt;&lt;P&gt;0, 1, 1&lt;/P&gt;&lt;P&gt;1, 1, 1&lt;/P&gt;&lt;P&gt;1, 0, 1&lt;/P&gt;&lt;P&gt;1, 0, 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I summarize the data into a new table where the first&lt;/P&gt;&lt;P&gt;column contains the column name from above,&lt;/P&gt;&lt;P&gt;and the second column contains the sum for each column above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column1, 3&lt;/P&gt;&lt;P&gt;column2, 2&lt;/P&gt;&lt;P&gt;column3, 4&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 00:32:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606960#M32253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T00:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606979#M32255</link>
      <description>&lt;P&gt;This is most easily done in the query editor with an unpivot followed by a group by step with Sum aggregations.&amp;nbsp;&amp;nbsp;To see how it works, just create a blank query, go to Advanced Editor, and replace the text there with the M code below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSAWMDpVidaCCJzIOw0HmGKCqBvFgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}, {"Column2", Int64.Type}, {"Column3", Int64.Type}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns",{{"Attribute", "Column"}}),
    #"Grouped Rows" = Table.Group(#"Renamed Columns", {"Column"}, {{"ColumnSum", each List.Sum([Value]), type number}})
in
    #"Grouped Rows"&lt;/LI-CODE&gt;
&lt;P&gt;Pat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 00:45:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606979#M32255</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2021-01-19T00:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606991#M32256</link>
      <description>&lt;P&gt;unpivot your table, then&amp;nbsp;group by attribute with aggregation type sum for the value&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 00:51:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1606991#M32256</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-01-19T00:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607020#M32259</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;-- thanks for the note!&lt;/P&gt;&lt;P&gt;I started by importing data using "Get Data" in Power BI...so at this point,&lt;/P&gt;&lt;P&gt;I would need to start with Power Pivot, perform the group by, then import&lt;/P&gt;&lt;P&gt;that data into Power BI...correct?&amp;nbsp; &amp;nbsp;THANKS!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 01:09:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607020#M32259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T01:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607026#M32260</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp;-- thanks for the code!&lt;/P&gt;&lt;P&gt;Unfortunately I'm el-newbo-grande with M code -- how would I integrate this code with an actual table?&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 01:16:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607026#M32260</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T01:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607070#M32263</link>
      <description>&lt;P&gt;Those steps are all from the Ribbon (no custom M).&amp;nbsp; Here are the steps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Connect to your data so you have the initial table in power query&lt;/P&gt;
&lt;P&gt;- Change the data types of the columns if needed&lt;/P&gt;
&lt;P&gt;- Highlight all 3 columns, right click and choose Unpivot Columns&lt;/P&gt;
&lt;P&gt;- Rename the Attribute Column to "Column" (or whatever you want)&lt;/P&gt;
&lt;P&gt;- Highlight that column and click on Group By on the Home tab of ribbon&lt;/P&gt;
&lt;P&gt;- In the pop up, give the new column a name, choose Operation of Sum on the Value column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 01:59:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607070#M32263</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2021-01-19T01:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607396#M32278</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Are you looking for this then please try the below calculation for the new table.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Summarize table = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Summarize',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Column 1", SUM('Summarize'[Column1]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Column 2", SUM('Summarize'[Column2]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Column 3", SUM('Summarize'[Column3])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Jan 2021 05:12:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1607396#M32278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T05:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1608932#M32310</link>
      <description>&lt;P&gt;Hello TarunSharma – thanks, this produces a table that looks like this:&lt;/P&gt;&lt;P&gt;col1,&amp;nbsp; &amp;nbsp;&amp;nbsp;col2, &amp;nbsp;&amp;nbsp;&amp;nbsp;col3&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a table that looks like this&lt;/P&gt;&lt;P&gt;col1, 1&lt;/P&gt;&lt;P&gt;col2, 2&lt;/P&gt;&lt;P&gt;col3, 3&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 15:21:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1608932#M32310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T15:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to summarize several columns into a new table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1609073#M32313</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp;-- Thanks, Pat...I was able to follow your directions -- table created!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 16:26:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/how-to-summarize-several-columns-into-a-new-table/m-p/1609073#M32313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-19T16:26:15Z</dc:date>
    </item>
  </channel>
</rss>

