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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Help with Row Level Security logic

Hello Community -  

 

I have a request from a sales team to modify our current RLS settings.   They want to add the ability of a sales manager (who is on a different team) to be able to view the sales data from a team that he is not currently a part of.   In my employee dimension table he is only a member of one team...and I don't want to add him to another team as this will cause a duplicate row (for user ID) which is a primary key.     The trick is, they don't want the other team members (to see his data on his current team).  

 

The below logic works to some extent...it allows the sales manager to see all of the "AF" team as well as his own data.   But it also allows for the AF team members to see his data (which is not what they want).   The AF team members should still only see their team data, but the sales manager should see his data and theirs.   

 

How can I modify this to achieve the desired result?   In my example below, the sales manager is "some.name".   

 

[Team] = "AF – North America"  ||  [User Principal Name] = "Some.Name@somewhere.com"

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@v-tangjie-msft     Hi Neeko  -  thank you for the response.   A simple solution was to just add this person to the role (in the Power Bi service) and that seems to be working! 

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to my understanding and research of the RLS function, if you have implemented dynamic RLS through the DAX statement writing logic in RLS applied to the value of the user UPN field in the related user table, then each user in the user table is equal, unless you use the If() statement in the DAX expression to separately define the data viewing logic corresponding to the user's role, so for your needs, I think there are only two possibilities to achieve at present:

Define a new role separately for the user "Some.Name@somewhere.com" and write specific data viewing logic
If you have the need to view the data set in full, you can consider directly sharing the "Write" permission of a data set to the user, which can ignore the logic of RLS and allow users to have the permission to view the data set in full, please refer to this document for details:

Dataset permissions - Power BI | Microsoft Learn

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Anonymous
Not applicable

@v-tangjie-msft     Hi Neeko  -  thank you for the response.   A simple solution was to just add this person to the role (in the Power Bi service) and that seems to be working! 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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