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.
Anonymous I understand your example, but I believe I have not been clear on my problem, what I need is to take the username function that returns the pbi user in domain\user format and look for that user in another table and return the full name.
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.
- Anonymous4 years agoNot applicable
Anonymous Excellent, this solution worked perfectly.