let ..... #"previous step" = ... ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Create Total row ---------------------------------------------------------------------------------------------------------------------------------------------------------------- TotalRow = Table.Group(#"previous step", {}, {{"Col 1", each "TOTAL"}, {"Col 2", each List.Sum([Col 2])}, {"Col 3", each List.Average([Col 3])}, {"Col 4", each List.Sum([Col 4])}, {"Col 5", each List.Sum([Col 5])}, {"Col 6", each List.Average([Col 6])}, {"Col 7", each List.Sum([Col 7])} }), combineTotal = Table.Combine({#"previous step", TotalRow }) ---------------------------------------------------------------------------------------------------------------------------------------------------------------- in combineTotal ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Create SubTotal row ---------------------------------------------------------------------------------------------------------------------------------------------------------------- //create subtotals for each region group = Table.Group(#"previous step",{"Col 1"},{"temp",each _ & Table.FromRecords({[ Col 1 = [Col 1]{0} & " Total", Col 2 = List.Sum([Col 2]), Col 3 = List.Sum([Col 3]), Col 4 = List.Sum([Col 4]) ]}) }), CombineSubtotals = Table.Combine(group[temp]),