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
Brianoreilly
Helper II
Helper II

DAX Vlookup using secondary columns

Hi All,

 

I have a question with respect to something similar to a Vlookup in DAX.

 

I have two tables. One is a Projects Table and the other is  Contact Table.

The Projects Table and Contact Table are relatable via the Project Manager ID in Projects Table and User ID in Contact Table.

 

What I want to do is add a column from the Contact Table (Full User Name) into the Projects Table and call this 'Project Manager Name'.

I can do this in SQL and Excel, but DAX has me beaten.

 

I have tried a tonne of functions such as 'LOOKUPVALUE', but to no avail.

I would greatly appreciate help on this, as the tables are based on Salesforce, which seems to use IDs instead of values for all referencing between tables.

 

Thanks in advance,

Brian.

 

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

@Brianoreilly

 

Hi, In Projects Table add a New calculated Column

 

Project Manager Name = RELATED(Contacts[Name])

 

And Will Work




Lima - Peru

View solution in original post

@Brianoreilly

 

You can Use "USERELATIONSHIP" to active the inactive relationship.

 

 




Lima - Peru

View solution in original post

5 REPLIES 5
Vvelarde
Community Champion
Community Champion

@Brianoreilly

 

Hi, In Projects Table add a New calculated Column

 

Project Manager Name = RELATED(Contacts[Name])

 

And Will Work




Lima - Peru

Hi,

 

Thanks for the help earlier.

I have the related function working, but now I have another questions.

 

On the Project Table, there is a "Project Manager" & a "Programme Manager", both of which use Contact IDs to reference the contact table to find the name. 

 

If I create a relationship between, Project Manager ID and Contact ID and use the related function it works with no problem.

But when I add a relationship between the Programme Manager ID and Contact ID, it chooses the active relationship.

 

To pull in the names for both columns, is there anyway other than duplicating the contact table, so Programme Manager can use the Original & Project Manager can use the duplicate for example.

 

Appreciate the help.

 

Thanks,

Brian.

 

 

 

@Brianoreilly

 

You can Use "USERELATIONSHIP" to active the inactive relationship.

 

 




Lima - Peru

Thanks again 😄

 

Appreciate the help.

Thanks man!

Did the trick 🙂

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.