Create table with level of parts and materials

Hello.

I need the drawing in the material table to have the items separated by level.
You have to create a table that pulls the material as level