Consolidate Column Data

Russ At Index

Well-known Member
Joined
Sep 23, 2002
Messages
706
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Good Afternoon,
Wonder if someone could assist in my problem of the moment !
5 Columns :
Type - Aisle - Bay - Level - Order
ABC - 7 - 30 - 10 - 17
ABC - 7 - 30 - 10 - 171
ABC - 14 - 3 - 10 - 2

I would like to add the two order qty's to create one record , whilst keeping the same column layout .
Eg :
ABC - 7 - 30 - 10 - 182
ABC - 14 - 3 - 10 - 2

Any ideas ??

Many thanks , stay safe ,

Russ
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
With Power Query use the Group By function

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Order", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Type", "Aisle", "Bay", "Level"}, {{"Total Order", each List.Sum([Order]), type nullable number}})
in
    #"Grouped Rows"

Book9
ABCDE
1TypeAisleBayLevelTotal Order
2ABC73010188
3ABC143102
Sheet2
 
Upvote 0
Hi Alan ,

Apologises for the delay in replying , i am new to Power Query (BI) ... could you point me in the right
direction of where to place / run your code please ?.

Many thanks , stay safe ,

Russ.
PS , my BI course was this week , cancelled until January .... Covid 19 :LOL:
 
Upvote 0
Russ

Select the data, goto Data>Get & Transform Data>From Table/Range.

Once in Power Query select the first 4 columns, right click and select Group By...

In the Group By dialog box enter an appropriate name for the new column, select Sum from the Operation dropdown and Order from the Column dropdown

Click OK, and then File>Close & Load to return the data to Excel.
 
Upvote 0
Thank you Norrie , as always appreciate the help.

I will give your kind instructions a try in the morning ,

Stay safe ,

Russ
 
Upvote 0

Forum statistics

Threads
1,215,477
Messages
6,125,036
Members
449,205
Latest member
Eggy66

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