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
rajulshah
Super User
Super User

Circular Dependency in creating relationship and implement RLS

Hello Everyone,

Whenever the user logs in, he/she should see their own data based on their permission on Organization, Branch and Area entity.
Users may not have permission to the entire Area, only to a specific Branch.

To implement Row Level Security(RLS) based on Organization, Branch, and Area, I have set the relationship as in the file attached.
But, I am unable to set the active relationship between Branch and Contact, Area and Contact as well as Contact and Message. I have to give the slicer of Company, Branch, Area, Contact, User, Role and Client.

Please guide as to how I should apply RLS as well as each entity filters other entities.

 

You can find the sample file here.

 

Please know that I have gone through these articles but wasn't able to come up with optimal solution.

Thanks in advance.

1 ACCEPTED SOLUTION

Hi @rajulshah,

After checking your sample file, I found you can't multiple bridge tables and try to link and active these relationships at the same time. As I said, current power bi only supports one major relationship activated.

In my opinion, I'd like to suggest you use concatenate relationship fields as relationship keys instead build relationships in multiple fields.

You can refer to the following blog to extract and merge your fields to a table, then concatenate each field as a unique key. (notice: please also add this concatenate field on your fact table side)

Relationship in Power BI with Multiple Columns 

After these steps, you can create a relationship based on concatenating unique key to apply filter effect on multiple column conditions at the same time.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @rajulshah.

I think you need to modify your table relationship mapping to keep one major relationship with both direction mode and turn on 'apply security filter on both direction' option to keep RLS filter across the relationship.

Relationships in analysis services tabular models  

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hello @v-shex-msft,

 

Thanks for the response.

We tried changing the direction mode to 'both direction' but still wasn't able to resolve the error of circular dependency.
Please see the file with updated relationships here.

We are not able to assess how to modify relationships so that RLS is applied with both direction mode turned on.

 

Can you please help me further with this?

 

Thanks a lot for your help.

Hi @rajulshah,

After checking your sample file, I found you can't multiple bridge tables and try to link and active these relationships at the same time. As I said, current power bi only supports one major relationship activated.

In my opinion, I'd like to suggest you use concatenate relationship fields as relationship keys instead build relationships in multiple fields.

You can refer to the following blog to extract and merge your fields to a table, then concatenate each field as a unique key. (notice: please also add this concatenate field on your fact table side)

Relationship in Power BI with Multiple Columns 

After these steps, you can create a relationship based on concatenating unique key to apply filter effect on multiple column conditions at the same time.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.