Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Adding another column to a data table referencing results from another table? MERGE/LOOKUP??

Need to add a column to DATA table; using the value from data table 2 "Effective date"? So when Period[Table1]=Period[Table2] the resulting entry should be "Effective date"   What's the easiest way...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous 

    You may have a try by Merge.

    Then we select two tables and Period columns in two tables:

    Result:

    However, when we use calculated table, we can’t use merge in Power Query Editor, so at this time we have to use Dax to build a calculated column.

     

    Effective Date =
    LOOKUPVALUE (
        'Table'[Effective Date],
        'Table'[Period], Data_Calculated[Period]
    )

     

    Result:

    You can download the pbix file fro m this link:

    Case_Adding another column to a data table referencing results from another tableMERGEorLOOKUP.pbix 

     

    Best Regards,

    Rico Zhou

     

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