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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

undefined

Hi All,

I have two tables, Project table and User table. I have to fetch the name of the project manager using DAX exp.

 

Below is the table structure:

 

Project table

Project_ID    Name           Manager_Id       

1                  Aladeen       10

2                  Pointy           2

 

User table

User_ID       Name 

1                 Boss

2                 Baby

10               Musk

 

 

Now, I have to create to measure/column in the Project table with DAX which gives me the names of users from the second table.

P.S. Both the tables are in direct query mode.

 

Desired output-

Project table

Project_ID    Name           Manager_Id       Project_Manager

1                  Aladeen       10                     Musk

2                  Pointy           2                      Baby

 

How can I achieve this in DAX? Any help is appreciated.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below. It is for creating a new column.

 

Picture3.png

 

Project_Manager CC =
LOOKUPVALUE(User[Name], User[User_ID],Project[Manager_ID])
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
derrick777
Frequent Visitor

Create a relationship between the 2 tables (User_Id and Manager_Id)

Then you can just create a table visualization without any other step.

If for any reason you need to have the user in the project table, you can create a calculated column:
'Project table'[Project_Manager] = RELATED ( 'User table'[Name] )

amitchandak
Super User
Super User

@Anonymous , You can join manager id with user id  of use table and get the name

 

 

if already joined on another column, create one more inactive join and use userelationship to create a measure

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below. It is for creating a new column.

 

Picture3.png

 

Project_Manager CC =
LOOKUPVALUE(User[Name], User[User_ID],Project[Manager_ID])
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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