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
TCavins
Helper V
Helper V

Row Level Security with OR

Currently have RLS working excellently! Trying to reduce the dataset size for it as every report that external people see, uses it. I want RLS to work as is for external users but want to modify the security table so I don't have to have every single combination of internal employees and SecurityGroups. We have a lot! So, I added a column to the SecurityTable to flag if they are our employee or not. The table includes all external people and every security group they have. It also include a single record for every one of our employees with 1 for InternalEmployee.

 

TestTable

FirstNameSecurityGroup
BobGroup1
TomGroup2

 

SecurityTable

UsernameSecurityGroupInternalEmployee
susan@outside.orgGroup10
tiffany@mycompany.comNULL1

 

The relationship between these two tables is preventing me from doing this as the internal employee doesn't have a securitygroup. I have SecurityTable filtering TestTable joining on SecurityGroup. Is there a way to make RLS work this way listing tiffany just once or do I need to add a record in the security table for Group1, Group2, Group3 and so on?

For this example, Tiffany would see all the FirstNames and Susan would only see Bob.

1 REPLY 1
lbendlin
Super User
Super User

Do you want to keep these tables connected or are you planning to use the RLS table in lookup mode?  When you define the DAX rules for the RLS roles you can use your OR conditional as needed. Might also get away with COALESCE.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.