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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors