Sub topic 1
What Row-Level Security Does and Why You Need It
Row-level security (RLS) limits which rows a person can see in a Power BI semantic model. The same report can therefore show different results to different users. For example, a regional manager might see only West sales.
RLS filters data rows. It does not hide columns, change report layout, or protect the original source system. Apply separate permissions when users must not discover a column or access data outside Power BI.
Prerequisites
Assume you can load data in Power BI Desktop, understand fact and dimension tables, create one-to-many relationships, and write basic DAX comparisons.
Roles and Table Filter Expressions
A role is a named security rule. In Power BI Desktop, create a role under Modeling > Manage roles, select a table, and add a DAX table filter expression. The expression must return TRUE for rows the role may access.
The following role allows only rows whose Region value is West:
[Region] = "West"The filter applies to the selected table. Relationships can propagate it to related tables, depending on relationship direction and model design.
Static Roles: One Role per Audience
A static role contains fixed values. Create roles such as West Managers and East Managers, each with its own region filter. This approach is easy to understand and test, but every new audience or region may require another role.
| Role | Filter | Typical audience |
|---|---|---|
| West Managers | `[Region] = "West"` | West regional managers |
| East Managers | `[Region] = "East"` | East regional managers |
Static RLS works well when the number of audiences is small and stable. For many users, a dynamic role based on the signed-in identity is usually easier to maintain.
How Role Filters Travel Through Relationships
In a star schema, a role commonly filters a dimension table, such as Region. A one-to-many relationship then carries that filter from the dimension to the fact table, such as Sales.
Check relationship direction, active status, and matching keys when data appears empty or over-exposed. An incorrect relationship can prevent the role filter from reaching the fact table.
Exercise
What does a static RLS filter of [Region] = "West" allow?
Show answer
It allows rows for West and, through valid relationships, related fact rows for West.