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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Oussmissa
New Member

Dynamic RLS based on two users tables

Hello everybody,

I'm trying to implement RLS by Country and Brand at the same time based on two security tables.
Users who are in the security table by brand and other users who are in the 2nd security table by country.
We can have users who have access to the country but not the brand and the reverse case. ie users who exist in the first table but not the second and the reverse case.
We can have users who exist in both tables at the same time.

I have of course a Geography dimension table which contains the country code and brand code. this dimension is linked to my Sales fact table

Please help me how I can create a role (by country and brand at the same time) that takes these scenarios into consideration.

 

Oussmissa_0-1632164813877.png

 

3 REPLIES 3
Oussmissa
New Member

Thank you for your response @Greg_Deckler.

I have tried this but by doing this, the RLS is only applied for the users that exist in the 2 tables at the same time.
for a user who exists in table 1 and not table 2 or vice versa, he sees nothing...

@Oussmissa Oh yeah, you are right about that, let me think... What if you had a single users table related to your two user tables within just the user names and you applied the RLS there? I'm thinking it might end up with the same thing but maybe not?



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

@Oussmissa So you cannot create two rules like:

Table User 1: USERPRINCIPALNAME() = [Email]

Table User 2: USERPRINCIPALNAME() = [Email]

 

And the obvious relationships to Dimension Geography from both tables.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.