Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to match and get value from another table

I have two tables:

 

Table A

Driver_Name ,Date , total_order

 

Table B 

Driver_Name,Date ....

 

 

Now i want to i want to insert the value from table A when driver name and date are matched.

 

What should i do for this?

  • Hi Anonymous,

     

    You could add a calculated column in Table B via Lookupvalue funcion.

    New Column =
    LOOKUPVALUE (
        TableA[total_order],
        TableA[Driver_Name], TableB[Driver_Name],
        TableA[Date], TableB[Date]
    )

    Best regards,

    Yuliana Gu

4 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

    You could add a calculated column in Table B via Lookupvalue funcion.

    New Column =
    LOOKUPVALUE (
        TableA[total_order],
        TableA[Driver_Name], TableB[Driver_Name],
        TableA[Date], TableB[Date]
    )

    Best regards,

    Yuliana Gu

    • PoRoBi's avatar
      PoRoBi
      New Member

      I tried to use your formula but for some reason my tableB cannot be enterred/recognised. Any suggestions?

      Thanks

      • duardo08's avatar
        duardo08
        Icon for Advocate I rankAdvocate I

        Here it worked. The tables have to be related by some column

  • mwegener's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Anonymous

     

    use Power Query "Merge Queries"