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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Decal
Helper I
Helper I

Lookup Value in another table using a filter

This may be pretty basic for many of you, but here is what I am trying to do.  

 

I have a table of job requisitions and a table of job applicants.  I want to lookup a value in the applicant table ([new hire]) when the [candidate status] = "Ready for Hire".  The similar column between the two table is [job requisition]

 

I tried create a temptable:

VAR temptable = FILTER(RELATEDTABLE(dimApplicants),dimApplicants[candidate status]="Ready for Hire")
 
And then use a lookupvalue:
RETURN
LOOKUPVALUE (temptable[newhire],dimApplicants[job requistion],temptable[job requisition])
 
DAX doesn't like this.
 
I can always create a subset actual table and link to that, but I was just hoping to be more efficient.
2 REPLIES 2
danextian
Super User
Super User

Hi @Decal ,

 

LOOKUPVALUE does accept multiple lookup columns and values.

LOOKUPVALUE (
    dimApplicants[new hire],
    dimApplicants[job requistion], temptable[job requisition],
    dimApplicants[candidate status], "Ready for Hire"
)









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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
vicky_
Super User
Super User

You can always try:

Measure = CALCULATE(MIN(dimApplicants[newhire]), FILTER(RELATEDTABLE(dimApplicants),dimApplicants[candidate status]="Ready for Hire"))

just note that this doesn't handle the case where there's 2+ candidates

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.