0
0
Power BIbi_tool~15 mins

Managing RLS in Service in Power BI - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a Power BI developer at a retail company.
📋 Request: Your manager wants you to set up Row-Level Security (RLS) in the Power BI Service so that sales managers only see data for their own regions.
📊 Data: You have a sales dataset with columns: SalesID, Region, SalesManager, Product, SalesAmount, and Date.
🎯 Deliverable: Create a Power BI report with RLS configured so that when published to Power BI Service, each sales manager can only view their region's sales data.
Progress0 / 7 steps
Sample Data
SalesIDRegionSalesManagerProductSalesAmountDate
1Northalice@company.comWidget5002024-01-05
2Southbob@company.comGadget7002024-01-07
3Eastcharlie@company.comWidget3002024-01-10
4Westdiana@company.comGadget4502024-01-12
5Northalice@company.comGizmo6002024-01-15
6Southbob@company.comWidget5502024-01-18
7Eastcharlie@company.comGizmo4002024-01-20
8Westdiana@company.comWidget3502024-01-22
1
Step 1: Load the sales data into Power BI Desktop.
Use 'Get Data' to import the sales dataset with columns: SalesID, Region, SalesManager, Product, SalesAmount, Date.
Expected Result
Sales data is loaded and visible in the Fields pane.
2
Step 2: Create a new role for RLS in Power BI Desktop.
Go to Modeling tab > Manage Roles > Create a role named 'SalesManagerRole'.
Expected Result
A new role 'SalesManagerRole' is created.
3
Step 3: Define the RLS filter for the 'SalesManagerRole' to restrict data by SalesManager.
[SalesManager] = USERPRINCIPALNAME()
Expected Result
The role filters rows where SalesManager matches the logged-in user's email.
4
Step 4: Test the role in Power BI Desktop.
Modeling tab > View as Roles > Select 'SalesManagerRole' > Enter a test user email matching a SalesManager (e.g., alice@company.com).
Expected Result
Only sales data for Alice's region is visible.
5
Step 5: Publish the report to Power BI Service.
Click 'Publish' and select the target workspace.
Expected Result
Report is published and available in Power BI Service.
6
Step 6: Assign users to the 'SalesManagerRole' in Power BI Service.
In Power BI Service, go to dataset settings > Security > Add users' emails to 'SalesManagerRole'.
Expected Result
Each sales manager's email is assigned to the role.
7
Step 7: Verify RLS works by logging in as a sales manager in Power BI Service.
Log in as Bob and open the report.
Expected Result
Bob sees only sales data for the South region.
Final Result
Dynamic by RLS
Dynamic by RLS
Each sales manager can only see sales data for their assigned region.
RLS ensures data security and privacy in shared reports.
Testing roles in Power BI Desktop helps confirm correct filtering before publishing.
Bonus Challenge

Extend RLS to allow regional directors to see all sales data for their region, while sales managers see only their own data.

Show Hint
Create a separate role for regional directors with a filter on Region, and assign users accordingly.