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

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

Reply
Anonymous
Not applicable

How can I consolidate duplicate rows into a single row with concatenated values?

I have a table I have grouped in Power Query that contains duplicate IDs. I want to concatenate the differences between the values so I can have one row per ID using Power Query. Here is an example of the data:

 

ID       Vendor

1          Alpha

2          Alpha

2           Beta

3          Alpha

3           Beta

3         Gamma

 

As an example, I want to condense that data down to the following format:

 

ID              Vendor

1                 Alpha

2            Alpha, Beta

3     Alpha, Beta, Gamma

 

Any suggestions would be greatly appreciated.

1 ACCEPTED SOLUTION
PhilC
Resolver I
Resolver I

Try this:

 

#"Grouped Rows" = Table.Group(Source, {"ID"}, {{"Vendor", each Text.Combine([Vendor], ", "), type text}})

Based on the solution from @MarcelBeug in this post - https://community.powerbi.com/t5/Desktop/Combine-values-of-multiple-rows-in-one-row/td-p/308919

 

View solution in original post

2 REPLIES 2
PhilC
Resolver I
Resolver I

Try this:

 

#"Grouped Rows" = Table.Group(Source, {"ID"}, {{"Vendor", each Text.Combine([Vendor], ", "), type text}})

Based on the solution from @MarcelBeug in this post - https://community.powerbi.com/t5/Desktop/Combine-values-of-multiple-rows-in-one-row/td-p/308919

 

Anonymous
Not applicable

@PhilC, thanks for the suggestion! That worked once I modified the code as follows:

 

#"Grouped Rows" = Table.Group({"ID"}, {{"Vendor", each Text.Combine([Vendor], ", "), type text}})

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Kudoed Authors