Using Power query for appending data from table to customized output

RajaR

New Member
Joined
Aug 29, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Dears,
Currently I've an excel spreadsheet (Table1) of BOM's related to multiple products - which is downloaded from SAP.
I've a customized requirement to have the final BOM of all products with only the child parts (child part qty's multiplied based on parent code's qty).

I've uploaded a very shorter version consisting of only 3levels for 2products (1SSR007100 & 1SSR007101). In actual scenario, we've multiple levels with multiple products.
I need output as per 2nd snapshot attached (from columns 'B' to 'F' : wherein I've mentioned remarks in columns 'G & H').

Your reply is greatly helpful, which will reduce our non-value activity currently we are doing.
Awaiting your favorable reply.

Kalesh 2.xlsx
BCDEFG
2BOM LevelFinal FGDescriptionBOM componentBOM Component descriptionQuantity
311SSR007100High performance product ARE00100Roll 3.21
411SSR007100High performance product ARU00801Basic Product 3ph1
511SSR007100High performance product ARE00200Acutator 3.21
611SSR007100High performance product ARU00802Trip coil2
711SSR007100High performance product ARE00250Pin 2.51
82RU00801Basic Product 3phSE00100Plate2
92RU00801Basic Product 3phSU00801Pole assy 3ph3
102RU00801Basic Product 3phSE00300Alloy tip1
112RU00801Basic Product 3phSE00400Soldering paste1
122RU00802Trip coilSE00500Wire core2
132RU00802Trip coilSE00550Winding frame2
143SU00801Pole assy 3phTE00150Terminal 3ph1
153SU00801Pole assy 3phTE00220Finger5
1611SSR007101High performance product BRE00100Roll 3.21
1711SSR007101High performance product BRU00804Basic Product 4ph1
1811SSR007101High performance product BRE00255Acutator 4.51
1911SSR007101High performance product BRU00802Trip coil2
2011SSR007101High performance product BRE00250Pin 2.51
212RU00804Basic Product 4phSE00100Plate2
222RU00804Basic Product 4phSU00802Pole assy 4ph4
232RU00804Basic Product 4phSE00300Alloy tip1
242RU00804Basic Product 4phSE00400Soldering paste1
252RU00802Trip coilSE00500Wire core2
262RU00802Trip coilSE00550Winding frame2
273SU00802Pole assy 4phTE00155Terminal 4ph1
283SU00802Pole assy 4phTE00220Finger5
Input


Kalesh 2.xlsx
BCDEFGH
2Final FGDescriptionBOM componentBOM Component descriptionQuantity
31SSR007100High performance product ARE00100Roll 3.21
41SSR007100High performance product ASE00100Plate2RU00801 - Basic Product 3ph
51SSR007100High performance product ATE00150Terminal 3ph3SU00801 - Pole assy 3ph
61SSR007100High performance product ATE00220Finger15
71SSR007100High performance product ASE00300Alloy tip1
81SSR007100High performance product ASE00400Soldering paste1
91SSR007100High performance product ARE00200Acutator 3.21
101SSR007100High performance product ASE00500Wire core4RU00802 - Trip coil
111SSR007100High performance product ASE00550Winding frame4
121SSR007100High performance product ARE00250Pin 2.51
131SSR007101High performance product BRE00100Roll 3.21
141SSR007101High performance product BSE00100Plate2RU00804 - Basic Product 4ph
151SSR007101High performance product BTE00155Terminal 4ph4SU00802 - Pole assy 4ph
161SSR007101High performance product BTE00220Finger20
171SSR007101High performance product BSE00300Alloy tip1
181SSR007101High performance product BSE00400Soldering paste1
191SSR007101High performance product BRE00255Acutator 4.51
201SSR007101High performance product BSE00500Wire core4RU00802 - Trip coil
211SSR007101High performance product BSE00550Winding frame4
221SSR007101High performance product BRE00250Pin 2.51
Output


Thanks.
Regards,
Chozhan
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Dear Team,
Can anyone help...it shall be truly helpful.
 
Upvote 0
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Final FG"}, {{"Count", each _, type table [BOM Level=number, Final FG=text, Description=text, BOM component=text, BOM Component description=text, Quantity=number]}}),
    #"Expanded Count" = Table.ExpandTableColumn(#"Grouped Rows", "Count", {"Description", "BOM component", "BOM Component description", "Quantity"}, {"Count.Description", "Count.BOM component", "Count.BOM Component description", "Count.Quantity"}),
    #"Sorted Rows" = Table.Sort(#"Expanded Count",{{"Final FG", Order.Ascending}})
in
    #"Sorted Rows"
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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