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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors