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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Microsoft Employee
Microsoft 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
Microsoft Employee
Microsoft 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

mwegener
Most Valuable Professional
Most Valuable Professional

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 - Power BI Tutorials


Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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