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
sharpedogs
Advocate II
Advocate II

Merge or add a column from one table to another?

I have two tables with Cost Centers and UserID's. I want to move the details from table A over to table B. 

 

Table 1 - Take the users form table 2 that match table 1 and pull their Cost Center over in a new column

UserCost Center 
chad1111
jeff2222
mat3333
sam4444

   

 

Table 2

UserCost Center 
Chad5555
jeff6666
frank9999
mat8888

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Probably:

 

Column = LOOKUPVALUE('Table 2'[Cost Center ],'Table 2'[User],[User])

 

PBIX attached 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Probably:

 

Column = LOOKUPVALUE('Table 2'[Cost Center ],'Table 2'[User],[User])

 

PBIX attached 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hey Greg, 

This works perfect as a measure, but now that i see the measure in action i realize a measure won't work as i need to do additional transformations on these Cost Centers. So i really need it as a column, instead of a calcualted column. Thats why I was thinking something like a append or merge? 

 

Any ideas? I checked append and thats out of the question, merge looks a bit to much as it looks to merge all the fields?

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.

Top Solution Authors