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

Dax VLOOKUP same Table or any suggestion

Hello

I’m new here and of course I have a question to power BI especially to Dax.

 

I want to make a VLOOKUP (excel expression) within the same table. With Excel I would make it like this:

Vlookup.jpg

 

I tried it with a VLOOKUP in Power BI but this does not work. What is he right way to do this in DAX?

 

I am grateful for any suggestion.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @SimonWeber,

 

I have a made a simple table with the 3 values you need tey to add a column with the following code:

 

Column = IF (
Table1[ID] = 901,
LOOKUPVALUE ( Table1[Vonplatz], Table1[Nachplatz], Table1[Vonplatz] ),
Table1[Vonplatz]
)

You should get the desired result if you want you can make the 901 a variable on your model.

 

Lookup.png

 

Regards,

MFelix

 

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @SimonWeber,

 

I have a made a simple table with the 3 values you need tey to add a column with the following code:

 

Column = IF (
Table1[ID] = 901,
LOOKUPVALUE ( Table1[Vonplatz], Table1[Nachplatz], Table1[Vonplatz] ),
Table1[Vonplatz]
)

You should get the desired result if you want you can make the 901 a variable on your model.

 

Lookup.png

 

Regards,

MFelix

 

 

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello MFelix

 

Thanks a lot. Your code is working Smiley Happy

 

Best regards

Simon

 

 

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.