Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

To add new column, by comparing date fields from 2 tables

Hello, I have just started with Power BI, I'm not sure if this is a lame question to ask.   I have start_date in Table A and Approval_date in Table B.I want to compare these 2 date columns and cre...
  • v-kelly-msft's avatar
    v-kelly-msft
    4 years ago

    Hi  Anonymous ,

     

    If there is a primary key,you could use below method:

    Create a column as below:

    approval date = LOOKUPVALUE('Table B'[Approval_date],'Table B'[Index],'Table'[Index],blank())

    And you will see:

    Then you create another column to compare the two dates.

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my raeply as a solution!