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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
DanielCarvalho
Helper III
Helper III

Dynamic RLS based on user login and 2 or more criterias

Hello Community,

 

I am trying to create rules using RLS where depending on the email signed in, it looks at what criterias that person belongs to and filters the data accordingly. 

 

Lets say in my case I have 3 tables. Permission table has the user id/mail/country/team/position. I then have a country table and my data table. That data table is connected to my country table based on country code(I use this to have a country slicer to filter data by country) and the permission table is connected to the country table atm as it is the only conection I can make.

 

At the moment, using the USERPRINCIPALNAME() i have an rls rule so depending on the country that person is from it shows the data only for that country.

 

I want to create rules where if a person signs in with their username, rls checks which team that person belongs to and sees country x/y/z and if the position of that person is manager it sees EVERYTHING regardless of the country the manager is from.

 

DanielCarvalho_0-1680715329127.png

I created this quick sample showing the details i would have in my permission table and in the end what i would want for them to be able to see based on the email they used to sign in.

3 REPLIES 3
DanielCarvalho
Helper III
Helper III

I managed to get everything working except having issues when a user belongs to more then one office 365 group and therefore is in more then one rls rule. 

How is that an issue?

lbendlin
Super User
Super User

Sounds straightforward. What have you tried and where are you stuck?

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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