Forum Discussion

Moniek's avatar
Moniek
Resolver I
2 years ago
Solved

Combine rows of a table

Hi, I have got table 1 and I want make Table 2. Does anyone knows how to do?

 

Thankx!

 

  • Thankx Stéphane for the code, does I add a custom column? Or where Can I add the code, in M?

     

  • No, just add a new step and replace "Your_Source" by your "previous step"

4 Replies

  • Hi,

     

    Table.Group(
    Your_Source,
    {"Column 1"},
    { {"Column 2", each Text.Combine([Column 2], " / ")},
    {"Column 3", each List.Sum([Column 3])}},
    GroupKind.Local,
    (x,y) => Byte.From(y[Column 1] <> null))

    Stéphane

    • Moniek's avatar
      Moniek
      Resolver I

      Thankx Stéphane for the code, does I add a custom column? Or where Can I add the code, in M?

       

  • No, just add a new step and replace "Your_Source" by your "previous step"

    • Moniek's avatar
      Moniek
      Resolver I

      Thanks, I haven already solved it.