MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
Creating Roles and Filters0%
Study MaterialsCheatsheet
Power BI for IntermediateProgress 0%
1.1Quick recap of Import, Modeling, DAX1.2Project requirements for Intermediate Level
4.1What is RLS?4.2Creating Roles and Filters4.3Testing Security
HomeTutorialsPower BI for IntermediateCreating Roles and Filters
Testing Security

Creating Roles and Filters

Beginner12 min read•Updated: 2026-11-18•By Er. Sumit Kumar (MSK Institute)
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:
1 [Region] = "North"
  1. 1
    Click Save.
1Manage Roles Dialog:
2+-----------------------------------------------------------------------------+
3| Roles Tables Table Filter DAX Expression |
4| [New] Dim_Customer [Region] = "North" |
5| - North_Manager Dim_Geography <--- |
6| - South_Manager Fact_Sales |
7| - Tech_Only |
8| [Check DAX] [Save] |
9+-----------------------------------------------------------------------------+

2. Multi-Condition & Advanced DAX Security Filters

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

Example 1: Multi-Region Access

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

Example 2: Compound Dimension Security

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

Example 3: Threshold Filtering (Restricting Confidential Records)

1-- Hides transactions exceeding sensitive executive limits
2Fact_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.
1Power BI Service Security Page:
2Role: North_Region_Manager (Members: 3)
3 - aarav.sharma@company.com
4 - north-sales-team@company.com (Entra ID Security Group - Best Practice!)

Interactive Quiz• Knowledge Check

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.

12-Month Data Analysis Mastery Program

Master Full-Stack Data Analytics (Excel, SQL, Python, Power BI & Tableau)

Combine 15 complete courses, 150 chapters, 541 topics, live SQL/Power BI/Tableau dashboards, and Scikit-Learn capstones at MSK Institute Shikohabad or Live Online.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext