0
0
Power BIbi_tool~10 mins

Why RLS protects sensitive data in Power BI - Formula Trace Breakdown

Choose your learning style9 modes available
Sample Data

This table shows employees with their IDs, names, departments, and salaries.

CellValue
A1EmployeeID
B1Name
C1Department
D1Salary
A2101
B2Alice
C2Sales
D270000
A3102
B3Bob
C3HR
D365000
A4103
B4Charlie
C4Sales
D472000
A5104
B5Diana
C5IT
D580000
Formula Trace
FILTER(Employee, Employee[Department] = USERPRINCIPALNAME())
Step 1: USERPRINCIPALNAME()
Step 2: Employee[Department] = "Sales"
Step 3: FILTER(Employee, [TRUE, FALSE, TRUE, FALSE])
Cell Reference Map
    A       B       C       D
1 |EmployeeID | Name  | Department  | Salary
2 | 101  | Alice | Sales | 70000 
3 | 102  | Bob   | HR    | 65000 
4 | 103  | Charlie| Sales| 72000 
5 | 104  | Diana | IT    | 80000 

User's department: Sales (used in filter)
The formula uses the Department column to filter rows matching the user's department.
Result
    A       B       C       D
1 |EmployeeID | Name  | Department  | Salary
2 | 101  | Alice | Sales | 70000 
4 | 103  | Charlie| Sales| 72000 
The filtered table shows only employees from the Sales department, hiding others.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does USERPRINCIPALNAME() return in this example?
A"Alice"
B"Sales"
C"HR"
D"70000"
Key Result
FILTER(table, table[column] = USERPRINCIPALNAME()) filters rows to show only data matching the current user.