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.
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 Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Excellent, this solution worked perfectly.