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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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