Forum Discussion
Mic1979
Post Partisan
1 year agoGroup By for all the columns
Dear all, I have a table with more than 20 columns, and due to some operations, I have rows duplicated that I need to sum. The only thing I have in mind to solve this is with Group by functio...
- 1 year ago
Use this formula
= Table.Group(Source, {"Helper_1"}, {{"Count", each [s1=Table.UnpivotOtherColumns(_,{"Helper_1"},"A","B"),s2=Table.Pivot(s1, List.Distinct(s1[A]), "A", "B", List.Sum)][s2]}})If this answer helped resolve your issue, please consider marking it as the accepted answer. And if you found my response helpful, I'd appreciate it if you could give me kudos. Thank you!
Omid_Motamedise
Super User
1 year agoUse this formula
= Table.Group(Source, {"Helper_1"}, {{"Count", each [s1=Table.UnpivotOtherColumns(_,{"Helper_1"},"A","B"),s2=Table.Pivot(s1, List.Distinct(s1[A]), "A", "B", List.Sum)][s2]}})
If this answer helped resolve your issue, please consider marking it as the accepted answer. And if you found my response helpful, I'd appreciate it if you could give me kudos. Thank you!
- Mic19791 year ago
Post Partisan
it works. Many thanks