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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
olimilo
Continued Contributor
Continued Contributor

Concatenate values from related table as a calculated column?

Say I have the following tables:

 

Project

PROJ_ID
123456

 

Samples

PROJ_ID SAMP_ID VAL
123456 123456 A
123456 123457 B
123456 123458 C

 

Is it possible to combine the Samples[VAL] values based on the PROJ_ID as a calculated column in the Project table?

 

Edit: I know I can do this via Power Query, but in this instance, it has to be done via DAX.

1 ACCEPTED SOLUTION
mlsx4
Memorable Member
Memorable Member

Hi @olimilo 

 

You can create a new table with the following dax code, but I don't know if it is what you need:

 

naturalinnerjoin = 
    VAR
         LeftTable =
             SELECTCOLUMNS(
                 'Sample',
                 "PROJ_ID", 'Sample'[PROJ_ID] & "",
                 "VAL", 'Sample'[VAL]
             )
    VAR
        RightTable =
             SELECTCOLUMNS(
                 'Project',
                 "PROJ_ID", 'Project'[PROJ_ID1] & ""
             )
    RETURN
        NATURALINNERJOIN(LeftTable, RightTable)

 

View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

ThxAlot_0-1690441930185.png

 

Concat = CONCATENATEX( RELATEDTABLE('Sample'), 'Sample'[VAL], ", " )

ThxAlot_1-1690441982628.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



mlsx4
Memorable Member
Memorable Member

Hi @olimilo 

 

You can create a new table with the following dax code, but I don't know if it is what you need:

 

naturalinnerjoin = 
    VAR
         LeftTable =
             SELECTCOLUMNS(
                 'Sample',
                 "PROJ_ID", 'Sample'[PROJ_ID] & "",
                 "VAL", 'Sample'[VAL]
             )
    VAR
        RightTable =
             SELECTCOLUMNS(
                 'Project',
                 "PROJ_ID", 'Project'[PROJ_ID1] & ""
             )
    RETURN
        NATURALINNERJOIN(LeftTable, RightTable)

 

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.