Forum Discussion
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?
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.
4 Replies
- peterpanHelper I
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 ID User Name 884 John 885 Martin 886 Bob - danextianSuper User
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.