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
wkelly1002
Frequent Visitor

Need help on how to create a VLOOKUP scenario using DAX

I am trying to replicate the same functionality of a VLOOKUP equation in Power BI.

 

Ex. So there are 2 spread sheets involved. One of the spreadsheets has a column that contains persons ID: "js100". The other spreadsheet, which is the orgnaization list, contains the person ID in a column (js100) and the persons name associated with the ID in another column (Jon Snow).

 

I need to create a DAX equation for a calculated column that will look at the persons ID (js100) from the first spread sheet then compare it to Organization list spreadsheet, find the same ID (js100), and then display the name(Jon Snow) associated with the ID. I would like the DAX calculated column in the first spreadsheet.


This is the vlookup equation from the excel: =IF(A2="","",VLOOKUP(L2,orglist!$A$1:$G$55,2,FALSE))

 

I know how to do the first part, which is seperate from the VLOOKUP: =IF(A2="","",VLOOKUP(L2,orglist!$A$1:$G$55,2,FALSE))

Please let me know if you need more detail and I appreciate all the help I can get.

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@wkelly1002,

 

LOOKUPVALUE ( ) should work for you I would imagine.

 

Something like the following code:

 

lookupName = 
LOOKUPVALUE(
    Table2[name],
    Table2[persons ID], Table1[persons ID]
) 





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

@wkelly1002,

 

LOOKUPVALUE ( ) should work for you I would imagine.

 

Something like the following code:

 

lookupName = 
LOOKUPVALUE(
    Table2[name],
    Table2[persons ID], Table1[persons ID]
) 





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



That worked perfectly! Thank you!!

Anonymous
Not applicable

Hey @wkelly1002

 

I made a quick video tutorial going over this method. The trick is to use the SEARCH function. Hopefully you will find it useful to your situation. Give it a watch!

 

https://www.youtube.com/watch?v=_bdHe3z_fVU

 

Thanks,

Parker

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.