Forum Discussion
AnonymeC
1 year agoRegular Visitor
[Help needed] Group by several columns without selecting individually 1 by 1
Hi everyone, My aim is very simple yet somehow I couldn't find the ressources to do this task, I was hoping you could help me. So my goal is to do a simple group by for all the columns in my ...
- 1 year ago
Hi AnonymeC
let
Source = YourSource,
UnPivot = Table.UnpivotOtherColumns(Source, {"Code"}, "Attribute", "Value"),
Pivot = Table.Pivot(UnPivot, List.Distinct(UnPivot[Attribute]), "Attribute", "Value", List.Sum)
in
Pivotor
let
Source = YourSource,
Group = Table.Group(Source, {"Code"},
List.Transform(
List.Skip(Table.ColumnNames(Source)),
each {_, Expression.Evaluate("each List.Sum(["& _ &"])", #shared), type number } ) )
in
GroupStéphane
AnonymeC
1 year agoRegular Visitor
If needed I can generate a file.