Search code examples
excelaggregategroupingpowerquery

Power Query Nested Grouping


I have a problem for which I need you help or a hint how to solve it. I have table that consists of 4 columns like this.

enter image description here

I want to find the maximum of the Part Mass for each Part and devide it by the number of Defects for that part. Then fill that number back to the column Part Mass or a new column.

Any idea how I could do that? I read something about grouping and expanding within one formula in the power query editor, but I don't know how to do that. Im using Excel Power Query.

Thanks for your help.

I tried to use multiple pivot tables in Excel but that seems to be very complicated and not very transparent.


Solution

  • Start: enter image description here

    Group as follows:

    enter image description here

    Add custom column as follows

    enter image description here

    Expand the table enter image description here

    enter image description here