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
kbol
Helper I
Helper I

Data Modeling: Dimension Table with Component from Another Dimension

I'm in the process of trying to transform a semi-relational data model into a star schema for PowerBI and have been stumped by a situation where one dimension is a component of another.

The two dimensions conceptually are Staff and Date. The problem is that Staff have different roles, which is a criteria we want to slice on. A staffperson can have multiple roles at any given time and those roles can also change with time. Consequently, it is insufficient to simply have two unrelated dimensions because if a staffperson has ever had more than one role, they'll get counted for both in all facts. 

What I tried to do was create a table that has one row for each role a staffperson had on a given day to act as the Staff dimension, related to the fact table on the Staff field. Then I created a relationship from the Date dimension to that Staff table (admittedly breaking the star schema idea) and attempted to add a second relationship from the Date dimension to the fact table. Unfortunately, PowerBI views this as an ambiguous relationship. The behavior I am wanting is that a given Date selection filters both the Staff rows to the roles they had on any given day and filters the fact table to facts occuring within that selection.

I've cerated a toy test report that appears to work using this approach, but unfortunately it will require a bunch of USERELATIONSHIP measures which is what I am seeking to avoid. How can I model this situation more correctly?

1 ACCEPTED SOLUTION

@kbol 

 

You may take a look at the links below.

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Can you post an image of your sample model or post the PBIX?



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Duplicating the Date dimension does allow another relationship, but that would require two selections to be made when slicing by date. From the user experience side, I need for a single selection on the Date dimension to have the effect of filtering both.

Here is an image of the sample model. I can share the toy pbix, too, but I cannot find a way to attach files here.
dim_trouble.PNG

@kbol 

 

You may take a look at the links below.

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Two avoid that you might have to create multiple copies of the table.

 

Table1 = Table //referenece

Table1 =distinct(Table)//New copy .

 

Refer this, it discusses role-playing dimension : https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.