Forum Discussion
Anonymous
2 years agoNot applicable
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 ...
- 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
_AAndrade
Resident Rockstar
2 years agoHi,
In power query use this code:
let
Source = Table.Combine({T_Table1, T_Table2}), // Replace T_Table1 and T_Table2 with the names of your tables
#"Grouped Rows" = Table.Group(Source, {"Month"}, {{"Sum", each List.Sum([Rate]), type nullable number}})
in
#"Grouped Rows"
The final result should be this:
- Anonymous2 years agoNot applicable
That worked perfect. Not to complicate things, but what if I then had multiple rate types that I wanted to sum together?
Table 1:
Month RateType1 RateType2 RateType3
Jan .05 .035 .075
Table 2:
Month RateType1 RateType2 RateType3
Jan .025 .015 .035