Recall & Review
beginner
What is Dynamic Row-Level Security (RLS) in Power BI?
Dynamic RLS restricts data access based on the logged-in user's identity, allowing different users to see only the data they are permitted to view without creating separate roles for each user.
Click to reveal answer
beginner
What DAX function is commonly used to get the current user's username in Dynamic RLS?
The USERNAME() function returns the domain and username of the logged-in user, which can be used to filter data dynamically.
Click to reveal answer
intermediate
How do you typically set up a Dynamic RLS rule using USERNAME() in Power BI?
You create a role with a DAX filter like [UserEmail] = USERPRINCIPALNAME() or LOWER([UserEmail]) = LOWER(USERPRINCIPALNAME()), matching the logged-in user's email to a column in your data that stores user emails.
Click to reveal answer
intermediate
Why might you use LOWER() with USERPRINCIPALNAME() in Dynamic RLS?
Using LOWER() ensures case-insensitive matching between the logged-in user's email and the email stored in your data, preventing mismatches due to letter case differences.
Click to reveal answer
beginner
What is a common real-life example of Dynamic RLS with USERNAME()?
A sales manager logs in and sees only their region's sales data because the RLS filters data where the sales region matches the manager's username or email, ensuring data privacy and relevance.
Click to reveal answer
Which DAX function returns the current logged-in user's domain and username?
✗ Incorrect
USERNAME() returns the domain and username of the logged-in user in Power BI.
In Dynamic RLS, what does the expression [UserEmail] = USERNAME() do?
✗ Incorrect
This expression filters data so users see only rows where the UserEmail matches their username.
Why might you prefer USERPRINCIPALNAME() over USERNAME() in Dynamic RLS?
✗ Incorrect
USERPRINCIPALNAME() typically returns the user's email, which is easier to match with email columns in data.
What is the purpose of using LOWER() in a Dynamic RLS filter like LOWER([UserEmail]) = LOWER(USERPRINCIPALNAME())?
✗ Incorrect
LOWER() converts text to lowercase to ensure case-insensitive matching.
What happens if you do not set up Dynamic RLS correctly in Power BI?
✗ Incorrect
Incorrect RLS setup can expose sensitive data to unauthorized users.
Explain how Dynamic RLS works in Power BI using the USERNAME() function.
Think about how Power BI knows who is viewing the report and how it shows only their data.
You got /4 concepts.
Describe a step-by-step process to implement Dynamic RLS with USERPRINCIPALNAME() in a Power BI report.
Consider the data setup, role creation, DAX formula, and testing.
You got /4 concepts.