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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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


Regards
Zubair

Please try my custom visuals

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


Regards
Zubair

Please try my custom visuals

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.