Insights / RLS in Power BI / Part 14
Part 14 of 20 · Share itRLS and OLS in different roles: fix the error
The problem. A user is in an RLS role and an OLS role at the same time. Their visuals show errors.
Why. Roles add up (Part 13). Together, the two roles would show every row plus the hidden column. Power BI blocks that combination, and the error appears when the visual runs its query.
| Role | What it does |
|---|---|
| East team (RLS) | East rows only, Salary visible |
| Hide salary (OLS) | All rows, no Salary |
| Both together | Would be all rows + Salary → blocked |
The fix. Create one role for these users with both rules in it:
- RLS: the row filter, for example
[Region] = "East" - OLS: in Tabular Editor, Roles → your role → Table Permissions → set the Salary column to None. (TMDL view in Power BI Desktop works too.)
role 'East managers'
modelPermission: read
tablePermission Sales = [Region] = "East"
tablePermission Employees
columnPermission Salary = none
Then move the users into this role and take them out of the other two. If they stay in the old roles, the error comes back.
Check before go-live
- No one is in an RLS-only role and an OLS-only role at the same time Desktop
- Each audience's row filter and hidden columns are in the same role Desktop
Want a second pair of eyes on your own model? The RLS review checks your roles, relationships and workspace access against this checklist, at a fixed price.