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
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
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.