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.
Row Level Security is applied to rows, before your measure is calculated. You would need to have two fact tables, one with RLS applied, and one anonymized without RLS. Then you can use the second table for the totals.