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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jmansour4567
New Member

lookup value based on a condition

Good day, I have a question about creating a lookup column in power bi.

 

Table A is my response table and Table B is my submissions table where the lookup value will be calculated please see below:

 

Table A ResponseTable A TypeTable A B.ID

Place 1

Place1
Place 2Place2
Person 1Person1
Person 2Person2
Time 1Time1
Person 3Person3

 

Inorder to calculate Table B (Person **Lookup), I need to filter Table A Type for "Person" AND match Table A B.ID to Table B ID

 

Table B IDTable B (Person **Lookup)
1Person 1
2Person 2

 

 

Im fairly new to DAX so I am not quite sure do this. 

 

Any help would be much appreciated! Thank you all in advance!

 

Cheers

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jmansour4567 , New column in table B

 

maxx(filter(TableA, TableA[B.ID]  = TableB[ID] && TableA[Type] = "Person") , TableA[Response])

 

Change column name as per need

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

2 REPLIES 2
jmansour4567
New Member

Brilliant! thank you!

amitchandak
Super User
Super User

@jmansour4567 , New column in table B

 

maxx(filter(TableA, TableA[B.ID]  = TableB[ID] && TableA[Type] = "Person") , TableA[Response])

 

Change column name as per need

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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