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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
toum
Helper II
Helper II

Lookupvalue

Hello all,

 

I need assistance creating a new column in my table, tab1, by performing a lookup from tab2 based on the relationship between tab1[id] and tab2[fk]. However, I have to take the value from tab2 when the date in tab2 is the maximum date among all rows with the same foreign key (fk) in tab2 otherwise I will have a problem.  How can I achieve this without encountering potential issues?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@toum ,

The new column in Table 1

 

Maxx(filter(Tab2, Tab1[id] = tab2[Id]) , Tab2[Date])

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@toum ,

The new column in Table 1

 

Maxx(filter(Tab2, Tab1[id] = tab2[Id]) , Tab2[Date])

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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