- The USERNAME() DAX function returns the user's domain login in the format domain\user) locally, but returns the user principal name (the user's login credential) in the Power BI service. Therefore, security role filter expressions, user permissions tables, and any other dynamic user functionality added to Power BI datasets should align with the UPN email address format provided by USERPRINCIPALNAME().
- In locally shared data models, DAX text functions can be used to extract the domain and username from USERNAME(), like with USERPRINCIPALNAME() in this recipe's example:
The USERNAME() function used locally ...