Row-Level Security (RLS)

Power BI · Advanced Features

Theory

Row-level security restricts which rows of data a user can see, using the same report for everyone. In Desktop you define roles (Modeling → Manage roles), each with a DAX filter expression on one or more tables, such as [Region] = "North" on Sales. Filters on a dimension table flow through relationships to fact tables. After publishing, you assign users or security groups to each role in the Service under the semantic model's Security settings.

Static RLS hard-codes values per role. Dynamic RLS uses one role whose filter compares a column with the signed-in user, for example a UserRegion table with Email and Region, filtered by [Email] = USERPRINCIPALNAME() and related to the data. Priya, the North manager, then sees only North's three orders (₹3,200) in every visual. RLS applies to users with the Viewer role or app access; workspace Admins, Members and Contributors are not restricted by it.

Why we use it

Different people should see different data, such as their own region or customers. RLS lets one report and one model serve all of them securely instead of maintaining a copy per audience.

When to use it

Use RLS whenever data access depends on who the user is. Use dynamic RLS when there are many users or values, so you do not need a role per region. Hiding pages or using slicers is not security; RLS is.

How it works

  1. User opens the report
  2. Service checks the user's RLS role
  3. Is the user in a role? Yes: Apply that role's DAX filter. No: Show no data (Viewers need a role).
  4. Filter flows through relationships to fact tables
  5. Visuals show only permitted rows

Syntax

Desktop: Modeling → Manage roles → New role → table → DAX filter (e.g. [Region] = "North")
Test: Modeling → View as → choose role (and Other user for dynamic RLS)
Service: semantic model → ... → Security → add members to role
DAX: USERPRINCIPALNAME()

Example

// Static role 'North Manager' on Sales
[Region] = "North"

// Dynamic role 'Region Manager' on table UserRegion(Email, Region)
[Email] = USERPRINCIPALNAME()
// UserRegion relates to a Region dimension that filters Sales

// Test: Modeling → View as → Region Manager, Other user = priya@company.in
// Cards show Total Sales ₹3,200, Orders 3

Key points

Power BI topics

Power BI Introduction

Getting Data

Power Query (Data Transformation)

Data Modeling

DAX (Data Analysis Expressions)

Data Visualization

Dashboards & Reports

Power BI Service

Advanced Features

Projects & Case Studies

Interview & Certification

Advanced DAX & Time Intelligence

T
Tech Town
Log InSign Up Free
Home SQL Python DSA Power BI Snowflake Databricks Spark Gen AI Practice Problems Contest Blog

Power BI Dashboards & DAX

Learn data visualization and interactive dashboards step-by-step. Click any topic in the sidebar to open it right here.

{{ sectionCount }}
Sections
{{ topicCount }}
Topics
Free
Forever
Hands-on practice Practice DAX Online 250 business scenarios on a star schema — write a measure and compare your visual with the expected one. Start practising →
Section {{ sec.num }}

{{ sec.label }}

Power BI  /  {{ current.sectionLabel }}  /  {{ current.name }}

{{ current.name }}

Theory

{{ current.def }}

Why we use it

{{ rich.why }}

When to use it

{{ rich.when }}

Diagram

{{ rich.dg.caption }}

{{ tb.title }}
{{ c.v }}
{{ rich.dg.op }}
➜
{{ rich.dg.output.title }}
{{ c.v }}
{{ nd.label }}
{{ nd.sub }}
{{ nd.label }}
{{ nd.sub }}
{{ rich.dg.left.title }}
{{ it }}
{{ rich.dg.right.title }}
{{ it }}
On screen — where to click

{{ rich.ui.title }}

{{ u.text }}
  1. {{ st.n }}{{ st.text }}
{{ rich.ui.title }}
{{ u.text }}
Flowchart — how it works
{{ nd.text }}
{{ nd.text }}
◇ {{ nd.text }}
Yes → {{ nd.yes }}
No → {{ nd.no }}
Syntax / Where to find it
{{ current.syntax }}
Example
{{ current.example }}
What You'll Learn — click to check off
  • {{ pt.mark }} {{ pt.text }}

Share this topic