Forum Discussion

ccsrtw's avatar
ccsrtw
Advocate I
9 years ago
Solved

power query - group/pivot

I have a table with two columns:

 

ID                                        Product  

006F000000bqOUHIA2Apple
006F000000bqosaIAABBanana
006F000000dqoLdIAIPear
  

 

There are dupes in the ID column. I want to essentially group the IDs and merge their products together so instead of each combination of ID and Product getting its own row, it would look more like (no more dupes in ID):

 

ID                                        Product  

006F000000bqOUHIA2Apple; Banana
006F000000bqosaIAABBanana; Orange; Pear
  

 

Thanks!

  • ccsrtw

     

    Hi, A alternative in DAX:

     

    Create a New Table(from Modeling) and use this:

     

    Table =
    SUMMARIZECOLUMNS (
        Table1[ID],
        "FruitList", CONCATENATEX ( Table1, Table1[Fruit], "," )
    )

     

2 Replies

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    ccsrtw

     

    Hi, A alternative in DAX:

     

    Create a New Table(from Modeling) and use this:

     

    Table =
    SUMMARIZECOLUMNS (
        Table1[ID],
        "FruitList", CONCATENATEX ( Table1, Table1[Fruit], "," )
    )