Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

5.6 What is Row-Level Security (RLS)?

Lesson 46 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

What is Row-Level Security (RLS)?

Row-Level Security (RLS) is a Power BI feature that restricts which rows of data a user can see, based on their identity or assigned role. It enables multi-tenant reports where one report serves many audiences, each seeing only their authorized data.

The Problem RLS Solves

Without RLS: • Create separate reports for each region/team/department • Manually filter data before sharing • Risk of data leaks when sharing unfiltered reports

With RLS: • One report serves all users • Each user automatically sees only their authorized data • Security is enforced at the data model level — cannot be bypassed by users

RLS Architecture

User logs in → Power BI checks role assignment →
DAX filter applied to data model → Only matching rows visible

Components of RLS

ComponentDescription
RoleA named security role (e.g., "East Region", "Manager")
DAX FilterAn expression that filters table rows (e.g., [Region] = "East")
User AssignmentMapping of users/groups to roles (done in Power BI Service)
USERNAME()DAX function returning the logged-in user's email
USERPRINCIPALNAME()DAX function returning the user's UPN

Types of RLS

1. Static RLS

Roles have hardcoded filter values. You create a separate role for each group.

Example:

Role: "East Region"
Filter: [Region] = "East"

Role: "West Region"
Filter: [Region] = "West"

Pros: Simple to set up Cons: Doesn't scale — need a new role for every region/department

2. Dynamic RLS

Uses the logged-in user's identity to filter data dynamically. No need to create individual roles.

Example:

Role: "Sales Rep"
Filter: [SalesRepEmail] = USERPRINCIPALNAME()

How It Works:

  1. Your data table has a column with user identifiers (email addresses)
  2. The DAX filter uses USERPRINCIPALNAME() to match the current user
  3. Each user automatically sees only their own rows

Pros: Scales to any number of users Cons: Requires user identity column in data; more complex setup

When to Use Each Type

ScenarioRecommended
Few fixed groups (3-5 regions)Static RLS
Many individual usersDynamic RLS
Users belong to multiple groupsDynamic RLS with mapping table
Hierarchical access (manager sees team)Dynamic RLS with hierarchy logic
Simple departmental accessStatic RLS

RLS Limitations

Does not apply to workspace Admins or Members — they always see all data • Does not filter the data model in Power BI Desktop (only in Service) • Cannot restrict columns — only rows (use OLS for column security) • Performance impact — complex DAX filters can slow down report loading • Maximum of 512 roles per dataset