New USERPRINCIPALNAME DAX Function
Now that Power BI Desktop supports Row-level Security (RLS) security, modelers have a little predicament. On the desktop, the USERNAME() function returns the user’s domain login (domain\login). However, when the model is deployed to powerbi.com, Username() returns the user principal name which typically (but not always depending on how your AD is set up) is the user’s email address.