<?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 Combine Rows for Single Order in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797607#M87952</link>
    <description>&lt;P&gt;I am trying to combine rows with the same in DAX for a visual.&amp;nbsp; Right now the DB is showing this as two or multiple different lines based on quantity status.&amp;nbsp; The top chart shows how it looks currently.&amp;nbsp; The bottom chart is how I would like it to look in my visual.&amp;nbsp; There are many other columns that would be displayed, but this is the only part I am struggling to make happen.&amp;nbsp; I am open to a M Query solution as well, but thought there should be some way to do this in DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SO - Doc &amp;amp; Line&lt;/TD&gt;&lt;TD&gt;Line Item Qty&lt;/TD&gt;&lt;TD&gt;OBD Line Item Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;550781507710&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;4800&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;550781507710&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SO - Doc &amp;amp; Line&lt;/TD&gt;&lt;TD&gt;Line Item Qty&lt;/TD&gt;&lt;TD&gt;OBD Line Item Qty&lt;/TD&gt;&lt;TD&gt;Backorder&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;4800&lt;/TD&gt;&lt;TD&gt;2700&lt;/TD&gt;&lt;TD&gt;2100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Mon, 26 Sep 2022 18:45:04 GMT</pubDate>
    <dc:creator>A7T57ZZ</dc:creator>
    <dc:date>2022-09-26T18:45:04Z</dc:date>
    <item>
      <title>Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797607#M87952</link>
      <description>&lt;P&gt;I am trying to combine rows with the same in DAX for a visual.&amp;nbsp; Right now the DB is showing this as two or multiple different lines based on quantity status.&amp;nbsp; The top chart shows how it looks currently.&amp;nbsp; The bottom chart is how I would like it to look in my visual.&amp;nbsp; There are many other columns that would be displayed, but this is the only part I am struggling to make happen.&amp;nbsp; I am open to a M Query solution as well, but thought there should be some way to do this in DAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SO - Doc &amp;amp; Line&lt;/TD&gt;&lt;TD&gt;Line Item Qty&lt;/TD&gt;&lt;TD&gt;OBD Line Item Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;550781507710&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;4800&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;550781507710&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SO - Doc &amp;amp; Line&lt;/TD&gt;&lt;TD&gt;Line Item Qty&lt;/TD&gt;&lt;TD&gt;OBD Line Item Qty&lt;/TD&gt;&lt;TD&gt;Backorder&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;550781507710&lt;/TD&gt;&lt;TD&gt;4800&lt;/TD&gt;&lt;TD&gt;2700&lt;/TD&gt;&lt;TD&gt;2100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 26 Sep 2022 18:45:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797607#M87952</guid>
      <dc:creator>A7T57ZZ</dc:creator>
      <dc:date>2022-09-26T18:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797624#M87953</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399959" data-lia-user-login="A7T57ZZ" class="lia-mention lia-mention-user"&gt;A7T57ZZ&lt;/a&gt;&amp;nbsp;Seems like a simple Group By:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjU1MLcwBBLmhgZKOkogbGlgoBSrg1XK0Ai7nImFAYjCpc0MpCsWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"SO - Doc &amp;amp; Line" = _t, #"Line Item Qty" = _t, #"OBD Line Item Qty" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"SO - Doc &amp;amp; Line", Int64.Type}, {"Line Item Qty", Int64.Type}, {"OBD Line Item Qty", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"SO - Doc &amp;amp; Line"}, {{"Line Item QTY", each List.Sum([Line Item Qty]), type nullable number}, {"OBD Line Item Qty", each List.Sum([OBD Line Item Qty]), type nullable number}})
in
    #"Grouped Rows"&lt;/LI-CODE&gt;
&lt;P&gt;Or in DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = SUMMARIZE('Table'[SO - Doc &amp;amp; Line],"Line Item Qty",SUM([Line Item Qty]),"OBD Line Item Qty",SUM([OBD Line Item Qty]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 18:56:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797624#M87953</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-26T18:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797625#M87954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399959" data-lia-user-login="A7T57ZZ" class="lia-mention lia-mention-user"&gt;A7T57ZZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;why don't you just summarize by sum?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 18:54:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797625#M87954</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-26T18:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797686#M87955</link>
      <description>&lt;P&gt;This is just one of 30k different orders that I need to display.&amp;nbsp; I want the Sum for the two columns by based on the first column.&amp;nbsp; Essentially it will take 50k lines down to the 30k indivudual orders and allow me to calculate the total qty of shipped and the remaining qty to ship.&amp;nbsp; Apologies, I should have been more clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 19:21:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797686#M87955</guid>
      <dc:creator>A7T57ZZ</dc:creator>
      <dc:date>2022-09-26T19:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797691#M87956</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399959" data-lia-user-login="A7T57ZZ" class="lia-mention lia-mention-user"&gt;A7T57ZZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That doesn't change anything. Still don't understand why you cannot summarize the columns by sum? Or just create a simple SUM measures?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 19:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797691#M87956</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-26T19:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797707#M87957</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; I used the DAX Summarize that I have used many times, but think I was trying to over complicate what I was trying to accomplish.&amp;nbsp; I have many other columns with unique values, but will have to use a COUNT or MIN/MAX to display how&amp;nbsp; I want them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 19:37:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797707#M87957</guid>
      <dc:creator>A7T57ZZ</dc:creator>
      <dc:date>2022-09-26T19:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Rows for Single Order in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797714#M87959</link>
      <description>&lt;P&gt;You are correct, I used a simple summarize.&amp;nbsp; I was overcomplicating things trying to account for other columns that contain uniuque values.&amp;nbsp; Going to use MAX/MIN or COUNT to take care of that issue for my purpose.&amp;nbsp; Your response is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 19:41:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combine-Rows-for-Single-Order-in-DAX/m-p/2797714#M87959</guid>
      <dc:creator>A7T57ZZ</dc:creator>
      <dc:date>2022-09-26T19:41:00Z</dc:date>
    </item>
  </channel>
</rss>

