Creating Roles and Filters0%
Creating Roles and Filters
Beginner12 min read•Updated: Jul 11, 2026
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
- 1Open your report in Power BI Desktop.
- 2Navigate to the Modeling ribbon tab.
- 3Click on Manage Roles in the Security group.
- 4In the Manage Roles dialog:
- Click New (or Create).
- Name the role (e.g.,
North_Region_Manager).
- 1Under Tables, select the dimension table containing the attribute to filter (e.g.,
Dim_Geography). - 2In the Table filter DAX expression box, write your boolean filter expression:
DAX
[Region] = "North"
- 1Click 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:
- 1Navigate to your Workspace and locate the Dataset / Semantic Model.
- 2Click the More Options (...) icon next to the dataset and select Security.
- 3Under the role name, enter individual user email addresses or Microsoft Entra ID (Azure AD) Security Groups.
- 4Click 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 Lesson | Next Lesson |
|---|---|
| What is RLS? | Testing Security |
Practice Quiz
Test your understanding of this lesson with 5 questions. Each question has one correct answer.