Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm trying out the USERPRINCIPALNAME() function. So it displays the email address which is expected.
I have a dataset that has two columns, Name and Email Address. But in this case, since this is a measure, I can't do a relationship.
Is there a way to convert it to the display name of the email address?
Solved! Go to Solution.
Nevermind I managed to resolve it based on this thread: Solved: How to display Username with greetings when user ... - Microsoft Power BI Community
This is the code I used to achieve my initial problem:
Display Name =
VAR user = USERNAME()
VAR display = LOOKUPVALUE(Table1[User],Table1[Email],user)
RETURN(display)Nevermind I managed to resolve it based on this thread: Solved: How to display Username with greetings when user ... - Microsoft Power BI Community
This is the code I used to achieve my initial problem:
Display Name =
VAR user = USERNAME()
VAR display = LOOKUPVALUE(Table1[User],Table1[Email],user)
RETURN(display)Hi RLSid17
Do you want to filter so you can only see what is associeted to the current user?
For that you need to configure RLS , take a look at:
https://radacad.com/dynamic-row-level-security-with-profiles-and-users-in-power-bi
https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-rls
Other option is to create a calculated column where you will use the measure, it will work as as "Flag".
More help send a pbix with some dummy values and what do you eant as final result
Best regards
Bruno Costa | Continued Contributor
Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 👍
Take a look at the blog: PBI Portugal
Best regards
Bruno Costa | Super User
Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!!
Take a look at the blog: PBI Portugal
Hi @onurbmiguel_
Yes, I have tried RLS and it works the only thing is that I need to be able to change the email address to display name. For example (I'm using a sample from the link you have provided):
If it detects the user, is there a way for it to be converted into "Reza Rad" instead of "reza@radacad.com"?
I have a table that has the Name and the Email Address column. Is there a way for the USERPRINCIPAL() function in which it displays the email address to look up the Name that corresponds?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |