Cheat Sheets/Power BI/USERPRINCIPALNAME
DAX function

USERPRINCIPALNAMEDAX function reference

Current user's UPN.

Syntax

dax
USERPRINCIPALNAME()

Examples

dax
Customer[Email] = USERPRINCIPALNAME()
An email
dax
LOOKUPVALUE(SalesRep[Region], SalesRep[Email], USERPRINCIPALNAME())
Looks up the logged-in user's assigned region for row-level security

A common RLS pattern that gives one admin account unrestricted access alongside per-user filtering.

dax
IF(USERPRINCIPALNAME() = "admin@contoso.com", TRUE(), Customer[RepEmail] = USERPRINCIPALNAME())
true / false

Common mistakes & gotchas

Related DAX functions

From Security & context info

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet