Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

New Table from Existing Tables

I have two existing tables that each have their own unique/separate queries, and they both have the exact same structure.    Table 1: Month      Rate      Type Jan            .05        Base   ...
  • _AAndrade's avatar
    _AAndrade
    2 years ago

    Use this code:

    let
        Source = Table.Combine({T_Table1, T_Table2}),
        GroupedTable = Table.Group(
            Source, 
            {"Month"}, 
            {{"RateType1", each List.Sum([RateType1]), type number}, 
             {"RateType2", each List.Sum([RateType2]), type number}, 
             {"RateType3", each List.Sum([RateType3]), type number}}
        )
    in
        GroupedTable