Forum Discussion

Mic1979's avatar
Mic1979
Post Partisan
1 year ago
Solved

Group 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...
  • Omid_Motamedise's avatar
    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!