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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Vlookup

Hi 

 

I want to feed the column 'TABLE 01'[ID] with ID contained from table 02

Capture d'écran 2024-02-09 104551.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

to get this

Capture d'écran 2024-02-09 104558.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

How can I do it in DAX please. I thank you in advance.

Jay

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

You don't really even need dax. If you have these two tables:

ValtteriN_0-1707474675145.png

 

ValtteriN_1-1707474693074.png

 

Just create a relationship like this:

ValtteriN_2-1707474716327.png

Now you can visualize the account from one table and get the corresponding id:

ValtteriN_3-1707474813504.png

 


If you want to use dax:

Column:
(RELATED is the most straigt-forward)

ValtteriN_4-1707474896143.png

 

If you don't have a relationship:

Id =
var _acc = [Account] RETURN
CALCULATE(MAX('Table (24)'[Id]),'Table (24)'[Account]=_acc)

Measure:

Id_m =
var _acc = MAX('Table (25)'[Account]) RETURN
CALCULATE(MAX('Table (24)'[Id]),'Table (24)'[Account]=_acc)

 

ValtteriN_5-1707475059607.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

You don't really even need dax. If you have these two tables:

ValtteriN_0-1707474675145.png

 

ValtteriN_1-1707474693074.png

 

Just create a relationship like this:

ValtteriN_2-1707474716327.png

Now you can visualize the account from one table and get the corresponding id:

ValtteriN_3-1707474813504.png

 


If you want to use dax:

Column:
(RELATED is the most straigt-forward)

ValtteriN_4-1707474896143.png

 

If you don't have a relationship:

Id =
var _acc = [Account] RETURN
CALCULATE(MAX('Table (24)'[Id]),'Table (24)'[Account]=_acc)

Measure:

Id_m =
var _acc = MAX('Table (25)'[Account]) RETURN
CALCULATE(MAX('Table (24)'[Id]),'Table (24)'[Account]=_acc)

 

ValtteriN_5-1707475059607.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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