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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
peterpan
Helper I
Helper I

Linking Two Dimension Table having Primary Key

I have two dimension table, project table with user id and user name table. They are connected to fact table where current projects are listed. I want to know which project is assigned to user name. I can't use crossfilter or bidirectional filter since fact table only has projects currently going on. Any idea on how to get this result?

1 ACCEPTED SOLUTION

It appears that the primary and forein keys are all User ID so why not create just a single dimensions table for simplicity's sake? But if you really want them seprate and still want Username in Projects table, you can use

User Name =
LOOKUPVALUE ( User[User Name], User[User ID], Project[User ID] )

 

or do  a merge in power query.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @peterpan,

 

It would be easier for us to understand what you're tryint to achieve if you posted a sample data along with the sample result from that data. Please make it workable, something we can copy paste or better yet a post a link to an Excel file stored in the cloud.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Here's a sample data attached for your reference https://drive.google.com/file/d/1_HEtVC6u6BFFJglrziWrH31XdFC3Bswb/view?usp=sharing . The result I'm trying to get is - 

 

Project IDUser Name
884John
885Martin
886Bob

It appears that the primary and forein keys are all User ID so why not create just a single dimensions table for simplicity's sake? But if you really want them seprate and still want Username in Projects table, you can use

User Name =
LOOKUPVALUE ( User[User Name], User[User ID], Project[User ID] )

 

or do  a merge in power query.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you so much!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors