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
spv
Frequent Visitor

RLS with multiple roles - Slicers not affected

Hi everyone,

I am kind of new to RLS but I have read a lot about it.

I am working on a report and want to limit the values that a user can see. The user should see only data for themselves or data for employees reporting to them. This is the dynamic RLS with Organizational Hierrarchy, which I have implemented successfully.

 

However, I want ot add one more role where I will manually give access for specific users to see data for specific Business Units. For this, I have created an excel file which I input in the Power BI report. Below the format with dummy data can be seen:

 

EmployeeEmailRegionSubregion Business UnitKey
Aa@mail.com11A11
Aa@mail.com12B12
Aa@mail.com21C13
Bb@mail.com11A11

  

I created a Buffer Table where I implement the new Role with definition:

'BufferTable'[Key] = LOOKUPVALUE('SecurityTable'[Key], 'SecurityTable'[Email], USERPRINCIPALNAME(), 'SecurityTable'[Key], 'BufferTable'[Key])

 

After that I connected the Buffer Table with my Business Unit Table with a Single directional relationship.

 

With the two above roles, the user can only see either the data about themselves and the employees below them or the data I have given them access manually. However. the slicers using columns from the Business Unit Table are not affected and the user can see every option. How could I fix that?

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @spv ,

Not certain what is your expeceted output. If you want to get specific user data, just define the role like:

[Email] = USERPRINCIPALNAME()

When you view as a@mail.com, the slicer will also be filtered.

RLS1.pngRLS2.png

How did you create a buffer table and what did the key field represent..

If the above is not helpful, perhaps need more details about this issue for further discussion.

 

Best Regards,
Yingjie Li

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

spv
Frequent Visitor

Hi,

 

Thank you for your message.

 

What you are describing is a simple RLS, right?

This has been already implemented in the report but on the Employee Dimension Table. Now I am trying to implement an extra role so that the user that is in the Security Table can see all the business units that are assigned to him in the table. I did an [Email] = USERPRINCIPALNAME() on the Security Table and then 'BufferTable'[Key] = LOOKUPVALUE('SecurityTable'[Key], 'SecurityTable'[Email], USERPRINCIPALNAME(), 'SecurityTable'[Key], 'BufferTable'[Key]). The Key is a unique key for each Business Unit which is then connected to the Business Unit Dimension Table from where I use the Region, Country, Business Unit as slicers. 

 

The issue is that the slicers are not affected by the Role and present every option even though the user can only see the data we want. This is not that 'nice' as a user experience.  

Did you ever firgue this out. I am having the exact same issue.

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.