Forum Discussion

melvin9900's avatar
melvin9900
Frequent Visitor
3 years ago
Solved

POWER BI username() Desktop

Hello,

 I am using Power Bi desktop  and in my report I need to display the Logged user details. So I used the DAX function USERNAME() to display the logged user and USERPRINCIPALNAME() to display the user email address.

During development in my desktop the USERNAME() shows my Domain name which is correct and expected.

But when I upload the report to the ON-Premise report portal both USERNAME() and USERPRINCIPALNAME() displays the email address.  The report portal is logged using the Domain name because the access to the reports are provided using the domain name so I believe the USERNAME() should display the domain name not the email address . Am I missing anything ?

Please let me know.