Forum Discussion

Pintobean80's avatar
Pintobean80
Regular Visitor
2 years ago
Solved

Merging columns from two tables onto a third table based on criteria

I'm having a bit of trouble working all this out in my head. I have two tables that I'm bringing into Power BI (active link with both data sources). So here's basically what I'm trying to figure out ...
  • v-weiyan1-msft's avatar
    2 years ago

    Hi Pintobean80 ,

    As the method provided by PijushRoy  says, you can use the Merge query method.
    You may also consider using dax to solve the problem,please refer to the following content.

    My Sample:

    Table A:

    Table B:

    Based on your description, Please try code as below to create Calculated Table.

    Table3 = NATURALINNERJOIN(NATURALINNERJOIN('Table1',VALUES('Table2'[Job Title])),VALUES('Table2'[Age]))

    Result is as below.

     

    Best Regards,
    Yulia Yan

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