Power Query - Combining data

sanket_sk

Board Regular
Joined
Dec 27, 2016
Messages
140
Office Version
  1. 365
Platform
  1. Windows
Hi There,

I Have unique query on Power Query, I have below table in which Material Cost & Other cost are given in separate column against same PO but in separate rows.
I want to combine them and put it in single row, since the value can be available in any cell hence I am not using fill up / down function.

Sample Data ..

Order NumberOrder DateMaterial CostOther CostMisc
6000023680​
09-06-2023​
9840​
6000023680​
09-06-2023​
7630​
6000022591​
09-06-2023​
7458​
6000022591​
09-06-2023​
9960​
6000053387​
18-07-2023​
18422​

Result I am looking is

Order NumberOrder DateMaterial CostOther CostMisc
6000023680​
09-06-2023​
9840​
7630​
6000022591​
09-06-2023​
9960​
7458​
6000053387​
18-07-2023​
18422​

Could you please guide me steps in excel power query to achieve this.

Thanks & Regards,
Sanket
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You could just group on order number and order date and sum the other columns.
 
Upvote 0
Like RoryA said

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    grp = Table.Group(Source, {"Order Number", "Order Date"}, {{"Material Cost", each List.Sum([Material Cost])},{"Other Cost", each List.Sum([Other Cost])},{"Misc", each List.Sum([Misc])}})
in
    grp
 
Upvote 0

Forum statistics

Threads
1,224,937
Messages
6,181,865
Members
453,068
Latest member
DCD1872

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top