Row-Level Security (RLS) in Power BI: Complete Guide (Static, Dynamic & Manager RLS)

Row-Level Security (RLS) in Power BI: static, dynamic and manager RLS

When one Power BI report is shared with many people, they usually should not all see the same data. A regional manager should see only their region, a sales rep only their own customers, and a franchise owner only their own stores. Row-Level Security (RLS) does exactly that: one report, one data model, but every user sees only the rows they are allowed to see.

This guide brings everything about RLS in Power BI into one place: static RLS, dynamic RLS with USERPRINCIPALNAME(), manager hierarchies, testing, publishing, best practices and the most common problems.

Quick answer: In Power BI Desktop go to Modeling → Manage roles, create a role and add a DAX filter such as [Region] = "North" (static) or [Email] = USERPRINCIPALNAME() (dynamic). Test it with Modeling → View as, publish the report, then in Power BI Service open the semantic model's Security page and add users or groups to the role. RLS only restricts users with the Viewer role in the workspace.

What Row-Level Security does

RLS adds a filter to a table for everyone in a role. The filter is applied before any visual is calculated, and it flows through relationships like any other filter. Example: a Sales table with three regions.

UserRoleSees
Amit (North manager)NorthOnly North sales
Priya (South manager)SouthOnly South sales
Rahul (Sales head)All RegionsAll sales

Without RLS you would need three separate reports. With RLS you maintain one report, and Power BI filters the data automatically for each person.

RLS vs hiding pages or visuals

Hiding a page, a visual or a slicer is not security. A user can still export data, use "Analyze in Excel" or build a new report on the same model. RLS filters the data inside the model, so restricted rows never reach that user.

Static RLS: one role per group

Static RLS is the simplest kind. Each role has a fixed filter value.

  1. In Power BI Desktop, open Modeling → Manage roles.
  2. Click New and name the role, for example North.
  3. Select the table to filter. Use a dimension table such as Region, not the large fact table.
  4. Add the filter. In the DAX editor it looks like this:
[Region] = "North"

Repeat for every region. Because Region filters Sales through the relationship, members of the North role see only North sales in every visual.

When to use static RLS: when you have only a few groups (3–5 regions or departments) that rarely change. With 50 stores, 50 roles become hard to maintain, and that is where dynamic RLS helps.

Dynamic RLS: one role for everyone

Dynamic RLS uses one role and a security table that maps each user's email to the data they may see. When users sign in, USERPRINCIPALNAME() returns their sign-in email, and the filter looks it up.

Step 1: Create a security table

EmailRegion
amit@company.comNorth
priya@company.comSouth
priya@company.comEast
rahul@company.comNorth
rahul@company.comSouth
rahul@company.comEast

One user can have several rows, so Priya sees two regions. Keep this table in Excel, SharePoint or a database so HR or managers can update it without touching the report.

Step 2: Add one role with a dynamic filter

Create a role called Dynamic Region and put this filter on the Region table:

[Region]
    IN CALCULATETABLE (
        VALUES ( UserAccess[Region] ),
        UserAccess[Email] = USERPRINCIPALNAME ()
    )

It reads: "keep the regions that appear next to my email in the UserAccess table". This pattern does not need a relationship between UserAccess and Region, and it avoids bi-directional filters.

Alternative: filter the security table directly

You can also relate UserAccess[Region] to Region[Region] and put [Email] = USERPRINCIPALNAME() on UserAccess. In that case the relationship must filter in both directions, and you must tick Apply security filter in both directions. It works, but the first pattern is simpler and faster.

USERPRINCIPALNAME vs USERNAME

Use USERPRINCIPALNAME(). In Power BI Service it returns the user's sign-in name (usually their email). USERNAME() can return DOMAIN\user in Desktop, which will not match your security table.

Manager hierarchy RLS (managers see their whole team)

Often a manager must see their own data plus the data of everyone below them. Use the PATH functions with an employee table that has EmpID, ManagerID and Email.

First add a calculated column with the reporting chain:

Employee[Path] = PATH ( Employee[EmpID], Employee[ManagerID] )

Then use this filter on the Employee table in the role:

PATHCONTAINS (
    Employee[Path],
    LOOKUPVALUE ( Employee[EmpID], Employee[Email], USERPRINCIPALNAME () )
)

Every employee whose chain contains the signed-in manager's ID stays visible, so a director sees all levels below them automatically.

Test RLS before you publish

  1. In Desktop, go to Modeling → View as.
  2. Tick the role. For dynamic RLS also tick Other user and type an email from your security table, for example priya@company.com.
  3. Check every page: totals, slicers and tooltips should show only the allowed rows.
  4. Click Stop viewing when you are done.

Test at least one user from each group, one user with several rows and one email that is not in the table. That last user should see an empty report, which proves the security works.

Publish and assign users in Power BI Service

  1. Publish the report to a workspace.
  2. In the workspace, find the semantic model (dataset), open More options (…) → Security.
  3. Select the role and add users or, better, security groups.
  4. Use Test as role on the same page to check it in the Service.

Important: RLS restricts only people with the Viewer role in the workspace (or people you share the report or app with). Workspace Admins, Members and Contributors can edit the model, so they always see all data. Share with business users as Viewers or through an app.

RLS best practices

  • Filter dimension tables, not fact tables. A filter on a small Region or Customer table is fast and flows to all related facts.
  • Prefer dynamic RLS when you have more than a handful of groups. One role is easier to maintain than fifty.
  • Use security groups instead of individual users in the Service, so access changes happen in Microsoft Entra ID (Azure AD) without republishing.
  • Keep role DAX simple. Complex filters run for every query and can slow the report down.
  • Remember that roles are combined. If a user is in two roles, they see the rows allowed by either role, not only the rows allowed by both.
  • Hide the security table from report view so users do not see who has access to what.
  • Document the roles: what each one filters and who maintains the security table.
  • Need to hide whole tables or columns? That is object-level security (OLS), which you set up with external tools such as Tabular Editor. RLS only filters rows.

Common RLS problems and fixes

A user sees all the data

They are probably an Admin, Member or Contributor of the workspace. Change their workspace role to Viewer, or share the report with them through an app.

A user sees nothing

Their sign-in email does not match the security table. Create a quick card with the measure Who Am I = USERPRINCIPALNAME(), ask the user what it shows, and fix the email in the table. Also check that the user has been added to the role in the Service.

Totals look wrong with RLS

Totals are calculated only from the rows the user is allowed to see, which is correct. If you need a "company total" for comparison, create a separate aggregated table without RLS that contains only non-sensitive totals.

RLS works in Desktop but not in the Service

Roles defined in Desktop do nothing until users are added to them in the Service. Open the semantic model's Security page and assign the members.

The report became slow after adding RLS

Check whether the role filter is on a large fact table or uses heavy functions. Move the filter to a dimension table and use the IN CALCULATETABLE pattern shown above.

Frequently asked questions

What is Row-Level Security in Power BI?

It is a feature that filters data at the row level for each user, so different people see different data in the same report and semantic model.

What is the difference between static and dynamic RLS?

Static RLS uses a fixed value in each role, for example [Region] = "North". Dynamic RLS uses one role with USERPRINCIPALNAME() and a security table, so access is controlled by data instead of by many roles.

Does RLS work for workspace admins?

No. Admins, Members and Contributors of the workspace always see all data. RLS applies to Viewers and to people who get the report through sharing or an app.

Can one user belong to more than one role?

Yes. The permissions add up: the user sees every row that any of their roles allows.

Do I need Power BI Pro for RLS?

You can create and test roles in the free Power BI Desktop. Sharing the secured report with others in the Service requires the usual licensing, such as Pro or Premium Per User for everyone, or a Premium/Fabric capacity.

Keep learning

RLS is built on filters and relationships, so a solid data model makes it much easier. Read One-to-Many vs Many-to-Many relationships and CALCULATE in DAX, follow the full Free Power BI Course, and keep the Power BI DAX Cheat Sheet close.

Are you setting up static or dynamic RLS? Describe your tables in the comments and I will help you choose the right filter.

Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Learn Excel, Power BI, and Finance in Simple Hindi and English Follow step-by-step tutorials and practical examples designed for students, job seekers, and working professionals. We cover Power BI dashboards, DAX formulas, Excel tricks, financial literacy, and AI tools.