Forum Discussion
Return full username
- Anonymous4 years ago
Hi Anonymous
As I mentioned before, UserName() will return Domain\Name in Power BI Desktop. UserPrincipalName() will return email format like [email protected] in Power BI Desktop.
Both of UserName() and UserPrincipalName() will return email format to show UPN(Current user login in Power BI Service) in Power BI Service.
My Test:
CurrentName = CALCULATE(MAX('Table'[Name]),FILTER('Table','Table'[Domain\Name] = [CurrentUser]))In Desktop, UserName() will return Domain\Name, so measure works well.
In Service, UserName() will return a email format and measure won't work.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
please provide more details. What have you tried and where are you stuck?
- Anonymous4 years agoNot applicable
Get the usurname from the powerbi session and look it up in the table user and return the name.
ā