Forum Discussion
Dynamic Row level security
- 11 months 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.
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
- raju80042121 year agoFrequent Visitor
Hi FBergamaschi
It's just like I have a mechanism where a connected c and b connected to c
Here a is dimension and b is dimension c is fact
My scenario like I have rls on both and b
But I need slicer selection to select which rls I need to choose
Like slicer shows a
Then all visuals will be filter for users level access to table a
If slicer shows b
Then visuals will be filtered to rls level access to table b
It's like switch the rls and enable the user to which rls data they want to see
- raju80042121 year agoFrequent Visitor
Hi FBergamaschi ,
sample data for table --a
sample data for table--b
sample data for fact table
data model is likesample visual like below slicer one came from table a slicer 2 came from table b metrics from table c(fact)
now im creating 2 security roles to restrict table a data and table b data based on rls filter
1.who ever logged their pu data only they can see
2.who ever logged their reportee data only they can see
we want to enable the role switch mechanism in report to which role they want see data in report like hr or pu using toggle or slicer