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
markmess77
Resolver I
Resolver I

Row level security: multiple rules on the same table

I have a situation where I need to filter row level security by a couple of different rules. Essentially, I am working with a table that looks something along the lines of this:

 

ID1ID2DataField
10111424
1022125
 212412
103212
 3645

 

I need to implement RLS on the ID1 field, but in cases where the ID1 field is null - I then need to use the ID2 field.

 

I also have a security table with users and the associated ID's that they should see - one which relates to ID1 and another that relates to ID2.

 

I'm attempting to write a DAX expression in the Manage Roles section, but can't get the result that I need. Right now I am able to filter the RLS by only either ID1 or ID2, but not both. 

 

Is there a way that this can be done?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Look into COALESCE.

 

Keep in mind that RLS rules will be applied cumulatively, with the more permissive rules overriding the more restrictive rules.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Look into COALESCE.

 

Keep in mind that RLS rules will be applied cumulatively, with the more permissive rules overriding the more restrictive rules.

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.

Top Solution Authors