Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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?

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yulgu-msft
Employee
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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Thanks

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

Hi @Anonymous

 

use Power Query "Merge Queries"

 

Merge Queries.png

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.