Forum Discussion

aa_KF's avatar
aa_KF
Icon for Helper I rankHelper I
7 years ago
Solved

Merge rows that have the same id number

Hello,

 

I have table that contains many rows for each Person, I want to merge these rows together so each person has only one row seperating the rows value using a delmiter.

If the the cell contains duplication it suppose to hide it and show the values with no duplication. 

 

Original Table:


 

 

 

 

 

 

 

 

 

Desired Table:

 

 

 

 

 

 

 

Thank you and appreicate your help!

3 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Hi aa_KF 

     

    Try adding this step from the Query Editor.

    See sample file as well

     

    = Table.Group(#"Changed Type", {"ID", "Name", "Email", "Section"}, 
    {
    {"Course", each Text.Combine(List.Distinct(_[Course]),", ")},
    {"Result", each Text.Combine(List.Distinct(_[Result]),", ")}
    })

    • EaglesTony's avatar
      EaglesTony
      Icon for Post Prodigy rankPost Prodigy

      I have the same issue:

       

      Here is my code based off the resolution above:

       

      = Table.Group (#"Removed Columns", {"ISSUE_KEY"},
      {
      {"TEST", each Text.Combine(List.Distinct(_[TEST]),", ")}
      })

       

      However, I get an error "Expression.Error: The column 'TEST' of the table wasn't found.

       

      But it is on my table