You are developing a Power BI sales report that connects to a semantic model. The model contains a Sales table with transaction data and an Employees table that includes an EmailAddress column storing each employee's User Principal Name (UPN). You must implement dynamic row-level security (RLS) so that each salesperson sees only their own sales. The Employees table is related to the Sales table.
Which DAX expression should you use in the role definition to achieve this?
Create a role on the Employees table with the expression [EmailAddress] = USERPRINCIPALNAME().
Create a role on the Sales table with the expression [EmailAddress] = USERPRINCIPALNAME().
Create a role on the Employees table with the expression [EmailAddress] = USERNAME().
Create a role in the Power BI service and add members, but leave the table filter blank so the system handles security automatically.
Create a security role that filters the Employees table with [EmailAddress] = USERPRINCIPALNAME(). The USERPRINCIPALNAME() function reliably returns the viewer's UPN in both Power BI Desktop and the Power BI service. Applying the filter to the dimension table keeps the rule efficient and lets the relationship propagate the filter to the related Sales fact table. By contrast, USERNAME() returns DOMAIN\user in Desktop, which can break mapping, and filtering the fact table directly is less performant.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is dynamic row-level security (RLS)?
Open an interactive chat with Bash
What is the USERPRINCIPALNAME() function in Power BI?
Open an interactive chat with Bash
Why is filtering a dimension table more efficient for RLS in Power BI?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Manage and secure Power BI
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .