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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
theapengelly
Frequent Visitor

Concatenate one column and group by multiple

Hey, 

 

I am trying to reduce the number of rows in my table, by concatenating distinct values in a particular column, but I want to leave all other columns the same.

 

How would I go from this

ItemClientLabel
2442431A
2442431B
2442432A
2442432B
2442433A
2442433B
2442434A
2442434B
1762225B
1762226B

 

To this:

ItemClientLabel
2442431A,B
2442432A,B
2442433A,B
2442434A,B
1762225B
1762226B

 

So I just want to concatenate the unique values in the Label column, and group by Item and Client?

 

Thanks so much!

1 ACCEPTED SOLUTION
Smalfly
Responsive Resident
Responsive Resident

@theapengelly ,

 

try this:

 

Table.Group(Source, {"Item", "Client"}, {{"concat", each Text.Combine([Label], ", "), type text}})

View solution in original post

3 REPLIES 3
theapengelly
Frequent Visitor

Thank you this worked!

DataNinja777
Super User
Super User

Hi @theapengelly ,

You can produce your required output by writing a ConcatenateX measure like below:

ConcatenateX Label = concatenatex(distinct('Table'[Client Label]),'Table'[Client Label],", ")

The required output is as shown below:

DataNinja777_0-1726240151171.png

Best regards,

 

Smalfly
Responsive Resident
Responsive Resident

@theapengelly ,

 

try this:

 

Table.Group(Source, {"Item", "Client"}, {{"concat", each Text.Combine([Label], ", "), type text}})

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Solution Authors
Top Kudoed Authors