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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Mattyt510
Regular Visitor

Creating appropriate relationships for data model with multiple Fact tables

Hi all,

I'm quite new to building models and reports in Power BI and would greatly appreciate some advice on modelling.
I'm having issues configuring my model to be able to determine what Functions different Users have access to in a system, without having ambiguity in the model.

This is how my model looks currently:

Mattyt510_0-1728966035807.png

In this system users can be assoicated to Functions in two different ways. Either User -> Profile -> Role -> Function or User -> Role -> Function, hence the circular model.

The UserRoles, UserProfiles and ProfileRoles Fact tables have been derived from a single relationship table, which was formatted like this like below, and I split out in Power Query.

NameNameTypeAssocNameAssocTypeRelationshipType
User123URRole123User to Role
User246UPProf678User to Profile
Prof678PRRole123Profile to Role

I've tested using the relationship as a singular relationship table, but had issues with visualising the Users -> Roles relationship when the role is associated through a profile (Such as User246 being related to Role123 in the above table), and splitting the Fact table resolved this issue.

I've also tested using two User dimension tables to split the two pathways, however, my models relationships break at the ProfileRoles table.

I can build visuals for Users to Profiles, Users to Roles, Roles to users via profiles, and Roles to Functions, however, the report breaks down when trying to go from Users or Profiles to Functions, through roles. I've played with different cross filtering but haven't had any luck.

Any help/advice is appreciated.

Regards,

Matty

1 ACCEPTED SOLUTION

Hi @Mattyt510 ,

 

The question is the fact that you have both tables making the filter for "different sides" so when you add the names and the functions to your table it does not get the correct value.

 

Once again I believe you need to revise the way you have your model setup but with the current setup you can force the filters for function to be overwritten by the relationships using a dax measure:

Roles / function count = COUNTROWS( CROSSJOIN('RolesFunctions (2)', 'UserRole (2)'))

 

If you add this in you visualization you get the following result:

 

 

MFelix_1-1729096179870.png

 

MFelix_2-1729096199509.pngMFelix_3-1729096220673.pngMFelix_4-1729096231853.png

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Mattyt510 

Can you provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.

 

 

 

 

Best Regards,

Jayleny

 

Hi @Anonymous,

Here is a sample of my data set, unfortunately I've had to create mock data in case of any sensitive content, however the mock data set includes all scenarios of how users are related to functions.
User Function Sample.pbix
User Function sample.xlsx
I've created some basic visuals that I have in my report (although is missing details from dimension tables that in in my dataset). In the final page I am hoping to relate Users to Functions, even if there are seperate visuals for Users -> Profiles -> Roles -> Functions and Users -> Roles -> Functions, I've been unable to show this relationship in either scenarios.

Please let me know if the link doesn't work, I'm unable to upload files to this forum.

Regards

Hi @Mattyt510 ,

 

The question is the fact that you have both tables making the filter for "different sides" so when you add the names and the functions to your table it does not get the correct value.

 

Once again I believe you need to revise the way you have your model setup but with the current setup you can force the filters for function to be overwritten by the relationships using a dax measure:

Roles / function count = COUNTROWS( CROSSJOIN('RolesFunctions (2)', 'UserRole (2)'))

 

If you add this in you visualization you get the following result:

 

 

MFelix_1-1729096179870.png

 

MFelix_2-1729096199509.pngMFelix_3-1729096220673.pngMFelix_4-1729096231853.png

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Thank you @MFelix,

The DAX measure you've provided works well for achieving the results I'm looking for currently.

I agree with your point regarding revising the model to avoid filtering relationships both ways, however I'm unsure of what approach should be taken to avoid the issues I'm facing in this case.

Many thanks!

MFelix
Super User
Super User

Hi @Mattyt510 ,

 

Power BI is optimized to use a star schema, with one to many relationships with single filter, in you case you have  several bi directional  that you can see in the image below:

MFelix_0-1728982220127.png

Some of the best practices is to in some cases join some of the dimension tables into one this depends on the information and level of granularity.

In your case I believe that the fact that you have all of these bi directional will lead to a circular relationship that breaks the model.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi @MFelix, thank you for your advice.

 

Unfortunately there are many bi-directional relationships as a significant function of my report I'm hoping to have is identifying Functions associated with a User. Which in this case involves filtering across multiple Dimension and Fact tables (with how I have the model built currently.)

The bi-directional relationship between Profiles and ProfileRoles is also required to associate roles to users, where the rolea are inherited from a profile.

I have tried leaving the assoiation Fact table in its original form, however, I'm unsure how to navigate around Profiles being in two columns, as I will need to self reference the table to determine the User -> Profile -> Role relationship.

Mattyt510_0-1729045371038.png


Thanks for your help.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.