sandy666
08-24-2020, 04:11 PM
https://i.postimg.cc/4NdkNHqn/screenshot-130.png
let From = Excel.CurrentWorkbook(){[Name="From"]}[Content][From]{0},
To = Excel.CurrentWorkbook(){[Name="To"]}[Content][To]{0},
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
UOC = Table.UnpivotOtherColumns(Source, {"Labels"}, "Attribute", "Value"),
Type = Table.TransformColumnTypes(UOC,{{"Attribute", Int64.Type}}),
Select = Table.AddColumn(Type, "Select", each List.Select({[Attribute]}, each (_ >= From and _ <= To))),
Expand = Table.ExpandListColumn(Select, "Select"),
FilterNull = Table.SelectRows(Expand, each ([Select] <> null))
in Table.Group(FilterNull, {"Labels"}, {{"Sum", each List.Sum([Value]), type number}})
Note: cannot post data because it exceeds 15000 characters
let From = Excel.CurrentWorkbook(){[Name="From"]}[Content][From]{0},
To = Excel.CurrentWorkbook(){[Name="To"]}[Content][To]{0},
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
UOC = Table.UnpivotOtherColumns(Source, {"Labels"}, "Attribute", "Value"),
Type = Table.TransformColumnTypes(UOC,{{"Attribute", Int64.Type}}),
Select = Table.AddColumn(Type, "Select", each List.Select({[Attribute]}, each (_ >= From and _ <= To))),
Expand = Table.ExpandListColumn(Select, "Select"),
FilterNull = Table.SelectRows(Expand, each ([Select] <> null))
in Table.Group(FilterNull, {"Labels"}, {{"Sum", each List.Sum([Value]), type number}})
Note: cannot post data because it exceeds 15000 characters