Forum Discussion
Row level security
- 1 year ago
HI DiKi-I
DirectQuery mode with Row-Level Security (RLS) applied, all measures including totals are inherently affected by the security filters unless explicitly handled. To bypass RLS for a specific measure like your total, you can create a separate measure using the ALL() or REMOVEFILTERS() function to ignore the RLS filter on the employee table. For example:
Total_Without_RLS = CALCULATE([YourMeasure], REMOVEFILTERS(EmployeeTable))However, be aware that this will only work if the RLS is not enforced at the data source level (e.g., via SQL views or server-level security). If it is purely Power BI-managed RLS, this method should allow you to show unfiltered totals even in a DirectQuery model.
Hi DiKi-I
Step 1
Create an isolated fact table which can capture the Measure
Step 2
Any DAX implementation suggested might not be effective because Row-Level Security takes precedence in the order of operations. As a result, changes to the context through DAX will not have an impact, since it operates on data that has already been filtered by the security layer, hence Step 1 is needed
Probably same suggestion as lbendlin
Regards,
Ritesh
Community Champion
Please mark the answer if helpful so that it can help others
Dance-Sing with Data Projects - YouTube