Forum Discussion

jmansour4567's avatar
jmansour4567
New Member
4 years ago
Solved

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

  • 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

2 Replies

  • 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