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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Visuals filtering based on the username()

Hi Team,

 

I have two columns, EmpID and MgrID with RLS (role) created as EmpEmail = username() || MgrEmail = username().

 

This gives the rows where an email id is listed in EmpEmail or MgrEmail.

 

I have a single card visual where i would like to show the EmployeeName who logged in.

 

Due to the RLS settings, the sigle card is picking up names of Employee as well as his reportees as his email id can be found in MgrEmail.

 

So what is the best way to restrict this card visual to show only the user logged excluding his direct reportees.

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hello @Anonymous ,

 

why don't you create a measure that gives back the USERNAME() or USERPRINCIPLENAME()?

User = USERPRINCIPLENAME()

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi

View solution in original post

4 REPLIES 4
selimovd
Super User
Super User

Hello @Anonymous ,

 

why don't you create a measure that gives back the USERNAME() or USERPRINCIPLENAME()?

User = USERPRINCIPLENAME()

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi

Hey @Anonymous ,

 

did it work with the measure?

I'm curious if you could solve this issue 🙂

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

I have another question which i posted here. If you can clarify me on that i would be very grateful..

https://community.powerbi.com/t5/Desktop/RLS-with-admin-access/m-p/1732743#M683215

 

Anonymous
Not applicable

@selimovd 

 

Hi Selimovd, Thanks for checking on this.  Yes your answer helped me. Thanks a lot.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.