Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Aggregate column value based on category

I have this table:   And I want to create a new table with one column containing VPU names and two other columns containing the sum of actual runs for each VPU category and planned runs for e...
  • Cmcmahan's avatar
    Cmcmahan
    7 years ago

    Then you can create a table in the Query Editor.  Copy the original table, and then apply this Group By transformation:

    #"Grouped Rows" = Table.Group(#"<PREVIOUS STEP NAME>", {"VPU"}, {{"Planned Runs", each List.Sum([Planned Runs]), type number}, {"Actual Runs", each List.Sum([Actual Runs]), type number}})

    And you'll have a second table aggregated by the VPU.  You can also use the Group By wizard in the Transform tab to do the same thing.