Consolidate data while preserving columns

Hi there, I’m using Calc 6.4.7.2 on Ubuntu 20.04. I’m trying to consolidate multiple electronics bill of materials into a single list so that I can order all my parts in one go. I’ve copied all my BOMs into a single sheet and sorted by part number, here’s an example:
example.ods (14.8 KB)

If I use the consolidate tool, I end up losing all the intermediate columns and get the section marked “consolidated”. What I would like to get out of the tools is the section labelled “desired”, where it preserves the intermediate columns.

Is that possible with this tool? Thanks!

I think it is easy and more versatile with a pivot table. Menu/Insert/Pivot table
example.ods (18.2 KB)

This does exactly what I want, thank you!