Forum Discussion

BSM1985's avatar
BSM1985
Helper IV
5 years ago
Solved

Concatenate String Fields From Different Tables

Hello Team,

I have 3 tables in a model which have been joined together on ID. My requirement is to create a calculated field by concatenating the 3 fields coming from 3 different tables. The problem I see, I had to use the MIN/MAX functions to perform the concatenation but its giving me the wrong result.

 

Column= CONCATENATE(Table1.Country, MIN(Table2.State))

 

Please Note: I do have 1 to Many relationship

 

Below is my requirement.

  • BSM1985 There is a solution for this. You can merge all your tables into one and then can have concatnated values like below.

     

    You can merge two tables at once.

    First you merge table 1 and table2 and you will get merge_table1

    Second merge_table1 with table2 and you will get merge_table2 like below

     

     

     

    Below is the output that you are expecting.

     

     

    if you are having trouble in following, you may share your actual data with dummy values.

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BSM1985 ,

     

    Use something like this- Column  = CONCATENATE(Table1[column], RELATED(Table2[column]))

     

    Appreciate your kudos!! Mark this post as solution if this helps.

    • BSM1985's avatar
      BSM1985
      Helper IV

      Sorry Nikhil,

       I forgot to mention that I do have 1 to many relationship. If I use the RELATE I could not see the other fields in thhe expression drop down, coming from different tables.

      • negi007's avatar
        negi007
        Community Champion

        BSM1985 There is a solution for this. You can merge all your tables into one and then can have concatnated values like below.

         

        You can merge two tables at once.

        First you merge table 1 and table2 and you will get merge_table1

        Second merge_table1 with table2 and you will get merge_table2 like below

         

         

         

        Below is the output that you are expecting.

         

         

        if you are having trouble in following, you may share your actual data with dummy values.