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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

RLS question - can you combine fields as part of the RLS role configuration?

Does RLS have the ability to combine different fields in the RLS role, in the manage roles section?

 

For example, I have sales team members who might have opportunities that span across a team that they are not technically part of. 

 

For example, John Smith is part of Team A.    However, an opportunity might come in for an account that is an account that belongs under Team B, but John gets involved for whatever reason.   

 

So I need RLS to see John's userprincipal name, and filter out the correct team that he is a part of, but also to filter any other opportunity on team's that he not officially attached to.   I've tried using  something like UPN &&  Team Name in my RLS, but the result always filters out everthing when I go to test it.   Taking off UPN resolves the issue, but then I just see only the one team name.   I do have a dim_user table.    

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create a RLS role such as below:

vkellymsft_0-1636339639849.png

[UPN] = userprincipalname()&& [Team] = "A"

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

 

Anonymous
Not applicable

@v-kelly-msft    Hi Kelley  -  This is the exact setup that I have.   However, if I "test the role" using anything with UPN it just shows me blank values in the tables.    If I take UPN out of the formula, then I can see the data again.   
In my scenario, I am trying to test for certain users, that belong to a certain team.   I want "Joe Smith" to only see his content, and only for Team "A".   That is why I need the combination.    In the desktop environment, I can test both the role and a particular user.    But online, you are not given that choice...you can only test as the role.   So I can never tell exactly what my users might be seeing.   

Also, I cannot test on the actual report that my users see....I can only test on the dataset report that RLS is setup on.   (my users see a report that is connected via a live connection to the dataset that has RLS setup).   


 

Hi  @Anonymous ,

 

Create a measure as below :

measure =
USERPRINCIPALNAME ()

Check whether you have tested the correct UPN,as tested here,it works fine.

 

 

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors