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
abhiram342
Employee
Employee

Option to Disable/Bypass the RLS on active relationship

Hi Team - We have tabular model (screenshot below) and enabled RLS on the "DimCustomer" table, which is currently security applying the filter to both the "FactSales" and "FactCompute" tables.

However, we have a requirement to disable RLS between the "DimCustomer" and "FactCompute" tables, while still keeping it enabled for the "FactSales" table.

 

Upon reviewing the available solutions, I have come across below approaches, but it has certain disadvantages. Please suggest if there any other alternative options

 

1) Implement RLS on FactTable
   Implement RLS on FactSales Table Only 
   Disadvantage: FactSales is very big , it occupies 70 GB in our data model. I think implementing RLS on Fact will slow down the performance.

 

2) Clone the Customer Table
   Have two set of Customer Table and enable RLS on One Customer Table.
   Disadvantage: If we want to show Sales and Cores by customerName in single chart then we will end up with customerName from different tables

 

RLS Code On DimCustomer:
VAR CUSTOMERS =
CALCULATETABLE (
VALUES ( 'DimUser'[SubsidiaryID] ),
'DimUser'[UserAlias] = USERPRINCIPALNAME ()
)
RETURN
'DimCustomer'[CustomerID] IN CUSTOMERS

 

RLS.jpg

 

Thanks,

Abhiram

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi Abhiram,

 

With Option 2, with a clone of DimCustomer, I think it would work fine if you have it set up with:

  1. The clone of DimCustomer used for RLS purposes (let's call it DimCustomerRLS) related to just Fact Sales.
  2. The original DimCustomer related to both Fact Sales and Fact Compute.

This should allow RLS to fliter Fact Sales via the relationship with DimCustomerRLS, but for visuals you would just use DimCustomer, which would filter both Fact Compute and Fact Sales.

 

Also, I would recommend hiding DimCustomerRLS.

(Oh and I'm not sure if DimUser is used outside RLS. If so, it might also need to be cloned.)

 

Would this work for you?

 

OwenAuger_1-1684896633900.png

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

1 REPLY 1
OwenAuger
Super User
Super User

Hi Abhiram,

 

With Option 2, with a clone of DimCustomer, I think it would work fine if you have it set up with:

  1. The clone of DimCustomer used for RLS purposes (let's call it DimCustomerRLS) related to just Fact Sales.
  2. The original DimCustomer related to both Fact Sales and Fact Compute.

This should allow RLS to fliter Fact Sales via the relationship with DimCustomerRLS, but for visuals you would just use DimCustomer, which would filter both Fact Compute and Fact Sales.

 

Also, I would recommend hiding DimCustomerRLS.

(Oh and I'm not sure if DimUser is used outside RLS. If so, it might also need to be cloned.)

 

Would this work for you?

 

OwenAuger_1-1684896633900.png

Regards

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

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