Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aa_KF
Helper I
Helper I

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:


Untitled.png

 

 

 

 

 

 

 

 

 

Desired Table:

22.png

 

 

 

 

 

 

 

Thank you and appreicate your help!

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community 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]),", ")}
})

pq2.png

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community 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]),", ")}
})

pq2.png

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

@Zubair_Muhammad  Thank you a lot! It's working just fine

 

Much appreicated!! Smiley Very Happy

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.