Forum Discussion

tebtim19's avatar
tebtim19
Helper IV
5 years ago
Solved

Combine column

Anyone could help me with combining column in different tables? 

I have the following

Table A

   Email Address

   Age

   Address

   Code

  

  

 

Table B

   Full Name

   First Name

    Last Name

 

I need to create a column 

Where I will get the full name from table B to table A,

and relate the email address and full name

so I will get the same data in my New Full Name

 

 

output:

 

 

 

 

  • Hi, tebtim19 

    According to your description and sample picture, I guess that you want to get a column that can combine the value of email address and full name from two tables, I think you can achieve this using merge query in the Power Query and DAX to combine them, you can try my steps:

    I’ve created some data and give the two tables [Code] as the relative column.

    1. Go to the Power query, merge query like this:

     

     

    Then expand the table and select [Full name] column.

    1. And apply the change and create a new column in the table A like this:
    Name&Email =
    
    COMBINEVALUES(": ",[Table B.Full Name],[Email Address])

     

    And you can get what you want, like this:

     

    You can download my test pbix file here

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-robertq-msft's avatar
    v-robertq-msft
    Community Support

    Hi, tebtim19 

    According to your description and sample picture, I guess that you want to get a column that can combine the value of email address and full name from two tables, I think you can achieve this using merge query in the Power Query and DAX to combine them, you can try my steps:

    I’ve created some data and give the two tables [Code] as the relative column.

    1. Go to the Power query, merge query like this:

     

     

    Then expand the table and select [Full name] column.

    1. And apply the change and create a new column in the table A like this:
    Name&Email =
    
    COMBINEVALUES(": ",[Table B.Full Name],[Email Address])

     

    And you can get what you want, like this:

     

    You can download my test pbix file here

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.