Creating Roles and Filters0%

Creating Roles and Filters

Beginner12 min read•Updated: Jul 11, 2026
Study MaterialsCheatsheet

Creating Roles & Defining DAX Security Filters

Now that you understand the architectural concepts of Row-Level Security (RLS), let us walk through the exact step-by-step procedure to define static security roles and author DAX filter expressions in Power BI Desktop.


1. Step-by-Step Role Creation in Power BI Desktop

  1. 1
    Open your report in Power BI Desktop.
  2. 2
    Navigate to the Modeling ribbon tab.
  3. 3
    Click on Manage Roles in the Security group.
  4. 4
    In the Manage Roles dialog:
  • Click New (or Create).
  • Name the role (e.g., North_Region_Manager).
  1. 1
    Under Tables, select the dimension table containing the attribute to filter (e.g., Dim_Geography).
  2. 2
    In the Table filter DAX expression box, write your boolean filter expression:
DAX
[Region] = "North"
  1. 1
    Click Save.
Output
Manage Roles Dialog:
+-----------------------------------------------------------------------------+
| Roles Tables Table Filter DAX Expression |
| [New] Dim_Customer [Region] = "North" |
| - North_Manager Dim_Geography <--- |
| - South_Manager Fact_Sales |
| - Tech_Only |
| [Check DAX] [Save] |
+-----------------------------------------------------------------------------+

2. Multi-Condition & Advanced DAX Security Filters

Security filters support compound boolean logic (&&, ||, IN):

Example 1: Multi-Region Access

DAX
-- Allows viewing both North and Central regions
[Region] IN {"North", "Central"}

Example 2: Compound Dimension Security

DAX
-- Allows viewing Enterprise customers within the Western territory
[Region] = "West" && RELATED(Dim_Customer[Segment]) = "Enterprise"

Example 3: Threshold Filtering (Restricting Confidential Records)

DAX
-- Hides transactions exceeding sensitive executive limits
Fact_Sales[SalesAmount] <= 50000

3. Assigning Users in the Power BI Service

CRITICAL ARCHITECTURAL DISTINCTION: - Roles are defined in Power BI Desktop (.pbix). - Members (users/groups) are assigned in the Power BI Service (app.powerbi.com)!

After publishing your report to the Power BI Service:

  1. 1
    Navigate to your Workspace and locate the Dataset / Semantic Model.
  2. 2
    Click the More Options (...) icon next to the dataset and select Security.
  3. 3
    Under the role name, enter individual user email addresses or Microsoft Entra ID (Azure AD) Security Groups.
  4. 4
    Click Add and Save.
Output
Power BI Service Security Page:
Role: North_Region_Manager (Members: 3)
- aarav.sharma@company.com
- north-sales-team@company.com (Entra ID Security Group - Best Practice!)

Interactive Quiz

Multiple Choice Questions

Question 1
Which ribbon tab in Power BI Desktop contains the "Manage Roles" button?
Question 2
What is the syntax to filter a role to include both the "Electronics" and "Audio" categories using DAX?
Question 3
Where are actual user email addresses mapped to the RLS roles you created?
Question 4
What is the enterprise best practice for assigning users to RLS roles in the Power BI Service?
Question 5
What happens if a user belongs to TWO different RLS roles in the same dataset (e.g., North_Role and East_Role)?

Next Lesson

Testing Security

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
What is RLS?Testing Security

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

PrevNext