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

Concatenate all related text values

Hi all,

 

I would like to make a column based on 2 tables with a one to many relationship. Essentially I want to concatenate all values from related rows in the many table into the correct row of the one table.

 

Below is an example of this with Table 1 having a one to many relationship with Table 2. The total price column would be easy to achieve with Calculate(Sum('Table 2'[Price])), it's the Supplier/s column that I'm struggling with

 

Thanks in advance,

 

Tables Example.png

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @JoshSHardscape

 

You can use CONCATENATEX within CALCULATE to do this.

Something like:

Supplier/s =
CALCULATE (
    CONCATENATEX (
        VALUES ( 'Table 2'[Supplier] ),
        'Table 2'[Supplier],
        " ",
        'Table 2'[Supplier]
    )
)

CALCULATE is required for context transition just the same as with your Total Price calculated column, then CONCATENATEX is used to concatenate the distinct values of 'Table 2'[Supplier].

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @JoshSHardscape

 

You can use CONCATENATEX within CALCULATE to do this.

Something like:

Supplier/s =
CALCULATE (
    CONCATENATEX (
        VALUES ( 'Table 2'[Supplier] ),
        'Table 2'[Supplier],
        " ",
        'Table 2'[Supplier]
    )
)

CALCULATE is required for context transition just the same as with your Total Price calculated column, then CONCATENATEX is used to concatenate the distinct values of 'Table 2'[Supplier].

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Brilliant, just what I needed, wasn't sure when I tried it myself what expression I could use for the concatenatex function!

 

Thanks very much

 

-Josh

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