Forum Discussion
Power BI Row Level Security on a single page?
- 1 year ago
Hi BassG ,
Power BI doesn't natively support applying Row-Level Security (RLS) to just a single page, as RLS is model-wide by default. However, a practical workaround is to create a duplicate of the pupil-level data table specifically for the page that needs restriction. You can then apply RLS only to that duplicated table by linking it to your Permissions or School table, and use this version exclusively on the pupil-level page.The rest of the report can continue using the original, unrestricted school-level data without being affected by RLS. This allows you to restrict detailed pupil-level data while keeping the other pages open and filterable across all schools.
Alternatively, for a less secure but simpler method, you can create a DAX-based visual-level filter that checks if the user has access to the school and only displays pupil-level visuals when appropriate. From your data model image, it seems you're already working with multiple school-related tables, so it's important to ensure only one of those drives the RLS logic to avoid complications from ambiguous relationships.
Hi BassG ,
Power BI doesn't natively support applying Row-Level Security (RLS) to just a single page, as RLS is model-wide by default. However, a practical workaround is to create a duplicate of the pupil-level data table specifically for the page that needs restriction. You can then apply RLS only to that duplicated table by linking it to your Permissions or School table, and use this version exclusively on the pupil-level page.
The rest of the report can continue using the original, unrestricted school-level data without being affected by RLS. This allows you to restrict detailed pupil-level data while keeping the other pages open and filterable across all schools.
Alternatively, for a less secure but simpler method, you can create a DAX-based visual-level filter that checks if the user has access to the school and only displays pupil-level visuals when appropriate. From your data model image, it seems you're already working with multiple school-related tables, so it's important to ensure only one of those drives the RLS logic to avoid complications from ambiguous relationships.
- BassG1 year ago
Helper I
Thanks Rohit1991, that's exactly what I ended up doing - making a duplicate of the data & pointing everything on the pupil level page to that. Downside of it is there's about 350k rows across 46 columns which increases by about 20k rows 4 times a year.
Cheers,G