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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mjoe01
Regular Visitor

Using a table to search multiple columns in another table and return a value from the first table

I need to be able to understand which tasks managers need to be aware belong to their team. I would like to use table B which has a list of managers and their team members to identify which tasks in table A the manager has a team member with an action for that task and then return their name in a new column in table A. Teammembers may change over time, which is why I wanted to have table B since it will be easy to update the names in the table. Tasks will usually have just one manager working on it, if there is overlap, as long as one manager is aware of the task it's fine. 

 

Table A      Table B  New Column in Table A
Task IDaction 1action 2action 3  managerteam member Task IDManager Owner
1adambobbob  Davidadam 1David
2bobbobadam  Davidbianca 2David
3bobbiancabob  Davidcharlie 3David
4charliebobbob  Laurendan 4David
5bobbobdan  Timelena 5Lauren
6bobelenabob  Timsarah 6Tim
7sarahsarahbob     7Tim
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@mjoe01 

Please try this

Column = 
VAR A1= LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 1])
VAR A2=LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 2])
var A3=LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 3])
RETURN if(ISBLANK(A1),if(ISBLANK(A2),A3,A2),A1)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mjoe01 , Try a new column like

concatenatex(filter(TableB, TableA[action 1] = TableB[team member] || TableA[action 2] = TableB[team member] || TableA[action 3] = TableB[team member]),TableB[manager])

or

concatenatex(summarize(filter(TableB, TableA[action 1] = TableB[team member] || TableA[action 2] = TableB[team member] || TableA[action 3] = TableB[team member]),TableB[manager]),[manager])

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

@mjoe01 

Please try this

Column = 
VAR A1= LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 1])
VAR A2=LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 2])
var A3=LOOKUPVALUE(TableB[manager],TableB[team member],TableA[action 3])
RETURN if(ISBLANK(A1),if(ISBLANK(A2),A3,A2),A1)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.

June 2025 community update carousel

Fabric Community Update - June 2025

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