USERNAME DAX Function (Information) Volatile
Returns the domain name and user name of the current connection with the format of domain-name\user-name.
Syntax
This expression has no parameters.
Return values
The username from the credentials given to the system at connection time.
This function is not supported in calculated tables/columns.
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 functions
Other related functions are:
Last update: Nov 28, 2023 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/username-function-dax