Forum Discussion
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 NAME | USER EMAIL | USER LOCATION |
| Joe Blow | [email protected] | Kansas City Office |
| Sue Hue | [email protected] | Washington Office |
| Patty Hatty | [email protected] | Buffalo Office |
| Johnny Johnson | [email protected] | Atlanta Office |
| BZ Beez | [email protected] | Denver 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 = [email protected] THEN user_location card would show Denver Office.
you could do something like this, create a measure ;
User Location=var curruser = USERPRINCIPALNAME()returnCALCULATE(VALUES(shared_access[USER LOCATION]), FILTER(shared_access, curruser = shared_access[USER EMAIL] ))
5 Replies
- Rjesak
Helper I
That worked perfectly. Thanks so much.
- vanessafvg
Community Champion
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.
- Rjesak
Helper I
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!
- vanessafvg
Community Champion
you could do something like this, create a measure ;
User Location=var curruser = USERPRINCIPALNAME()returnCALCULATE(VALUES(shared_access[USER LOCATION]), FILTER(shared_access, curruser = shared_access[USER EMAIL] ))- Rjesak
Helper I
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."