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 agoYou want to sum by each type or sum all types in one line?
For example you want:
Jan 0.075 0.050 0.11
Or
Jan 0.235
?
Anonymous
2 years agoNot applicable
Table 1:
Month RateType1 RateType2 RateType3
Jan .05 .035 .075
Table 2:
Month RateType1 RateType2 RateType3
Jan .025 .015 .035
New Table:
Month RateType1 RateType2 RateType3
Jan .075 .05 .11
- _AAndrade2 years ago
Resident Rockstar
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