We can use Power Query for this.
Rather than completely reinventing the wheel, Imke Feldman has done some excellent work on processing multi-level BOMs, here: https://www.thebiccountant.com/2017/...l-and-powerbi/
In your case though, we first need to identify the Parent / Child relationships for your BOM.
First, format your source data as a table.
Now, first query:
Now we can lightly modify the query from Imke, in the link above:
This gives you rather more than just the Qty per component, which you initially required... Have a read of Imke's article to understand further. 
The attached workbook gives a simple output which matches your requirement.
Bookmarks