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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
toum
Helper I
Helper I

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

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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