Forum Discussion

siva_powerbi's avatar
siva_powerbi
Helper IV
5 years ago
Solved

Merge table using DAX and Create a calculated table

I have 2 tables, I have merged in Power Query and created a Merged table (Columns from both tables), but I need to do the same using DAX without using power Query.   loaded tables into Power BI and...
  • v-kelly-msft's avatar
    5 years ago

    Hi  siva_powerbi ,

     

    The .pbix file you share cant be opened;

    I use your sample data for instance:

    First create a relationship between the 2 tables,

    Then create a new table as below:

    Table = ADDCOLUMNS('Table1',"Test 3",CALCULATE(MAX('Table2'[Test3]),USERELATIONSHIP(Table1[Test2],Table2[Test3])),"Test 4",CALCULATE(MAX('Table2'[Test4]),USERELATIONSHIP(Table1[Test2],Table2[Test3])))

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!