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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.