Dashboard Mode - Testing RLS in Desktop
Goal
Understand how Row-Level Security (RLS) works in Power BI Desktop by testing user-specific data access.
Understand how Row-Level Security (RLS) works in Power BI Desktop by testing user-specific data access.
| OrderID | Region | Salesperson | SalesAmount |
|---|---|---|---|
| 1001 | North | Alice | 500 |
| 1002 | South | Bob | 300 |
| 1003 | East | Charlie | 400 |
| 1004 | North | Alice | 700 |
| 1005 | South | Bob | 200 |
| 1006 | East | Charlie | 600 |
Total Sales = SUM(Sales[SalesAmount])+----------------------+----------------------+ | Total Sales | Sales by Salesperson | | (KPI Card) | (Table) | +----------------------+----------------------+ | Sales by Region (Table) | +----------------------------------------------+
The RLS role filters all visuals automatically based on the logged-in user. When testing in Power BI Desktop, use the View As feature to simulate different salespersons. For example, selecting 'Alice' will show only her sales in all visuals.
If you use the View As feature to test the RLS role for 'Bob', which salespersons' data will appear in the dashboard?
Answer: Only rows where Salesperson = 'Bob' will appear in all visuals.