Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Rjesak
Helper I
Helper I

Display User Information on reports/dashboards

We have a table which includes user specific info (name, email address, location, etc.). I'd like for our reports and dashboards to show the user name and location. I have a report where I'm brought in the user info table and, of course, I can use USERPRINCIPALNAME to get the email address but is there any way to bind the USERPRINCIPALNAME to the email address in my user info table so that I can pull back the logged in user's name and location on the report/dashboard?

 

Here is an idea of what the shared_access table has in it:

USER NAMEUSER EMAILUSER LOCATION
Joe BlowJoe.Blow@gmail.comKansas City Office
Sue HueSusan.Hue@gmail.comWashington Office
Patty HattyPatricia.Hatty@gmail.comBuffalo Office
Johnny JohnsonJohn.Johnson@gmail.comAtlanta Office
BZ BeezBertrice.Beez@gmail.comDenver Office

 

I have imported the whole table into my report.

 

What I want to do is something like

WHEN (USERPRINCIPALNAME = shared_access.user_email THEN show shared_access.user_location

 

So, if PRINCIPALNAME = Bertrice.Beez@gmail.com THEN user_location card would show Denver Office.

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

you could do something like this, create a measure ;

 

User Location=
var curruser = USERPRINCIPALNAME()
return
CALCULATE(VALUES(shared_access[USER LOCATION]), FILTER(shared_access, curruser = shared_access[USER EMAIL] ))




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Rjesak
Helper I
Helper I

That worked perfectly. Thanks so much.

vanessafvg
Super User
Super User

you could do something like this, create a measure ;

 

User Location=
var curruser = USERPRINCIPALNAME()
return
CALCULATE(VALUES(shared_access[USER LOCATION]), FILTER(shared_access, curruser = shared_access[USER EMAIL] ))




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




So when I try to put this in a visual, I get an error that says "A table of multiple values was supplied where a single value was expected."

vanessafvg
Super User
Super User

can you provide some data or sample data, and then can you demonstrate exactly via dummy example of what you wanting to end up with.

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I'm so sorry! I updated the post to include this. I had a little trouble getting this post in (it kept not submitting it for some reason) so I had copied and pasted my message. I didn't notice that I had failed to include my sample in my copy. Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.