USERPRINCIPALNAME DAX Function (Information) Volatile
Returns the user principal name.
Syntax
This expression has no parameters.
Return values
Returns the name of the user as their email address, aka user@domain.com.
Remarks
This function is not supported in calculated tables/columns.
Despite the metadata exposed, this function does not work on Analysis Services 2016.
» 3 related functions
Examples
-- USERNAME is the local user name (same as USERPRINCIPALNAME using -- Azure AS and Power BI Service) -- USEROBJECTID is the security identifier in Active Directory and -- Azure Active Directory -- USERPRINCIPALNAME is the user principal name, typically the user -- email (it could be different in Active Directory on-premises) EVALUATE { ( "USERNAME", USERNAME () ), ( "USEROBJECTID", USEROBJECTID () ), ( "USEPRINCIPALNAME", USERPRINCIPALNAME () ) }
Related articles
Learn more about USERPRINCIPALNAME in the following articles:
-
Reading active Power BI security roles in DAX
This article describes how to read the active security roles in a Tabular model for Power BI or Analysis Services. This way, you can use measures and calculation groups to customize a report based dynamically on security roles active for the current user. » Read more
-
Customizing default values for each user in Power BI reports
This article shows how to use calculation groups to define a default set of values for columns in your model. Different users can have different default values, and yet retain the full capability to select different values. » Read more
-
DAX limitations with inactive relationships and row-level security (RLS)
When you apply row-level security to a semantic model, there are limitations in using the USERELATIONSHIP function. This article shows the issues, provides a workaround, and its restrictions. » Read more
Related functions
Other related functions are:
Last update: Nov 14, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Gert Christen
Microsoft documentation: https://docs.microsoft.com/en-us/dax/userprincipalname-function-dax