Forum Discussion
Dynamic Row level security
- Anonymous1 year ago
Hi raju8004212 ,
To clarify it isn’t possible to pass slicer values or variables into RLS. Power BI always applies RLS first (based on user identity), and only afterwards slicers/filters.That means a “toggle RLS by slicer” design isn’t supported. The only supported approaches are:
Dynamic RLS using USERPRINCIPALNAME() and a security mapping table.
Report-level toggles (disconnected slicer + measures/filters) to switch between PU/HR views within the user’s authorized data.
Separate roles/reports if different security contexts are mandatory.
So the workarounds I shared earlier will help you simulate the toggle experience, but the true RLS logic can’t be driven by slicers.
True RLS → Merge PU & HR into one mapping table and write one RLS filter based on USERPRINCIPALNAME().
Report-level workaround → Skip RLS, use a measure filter with slicer to simulate security.
For real security → use option 1.