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
jessimica1018
Helper I
Helper I

RLS with multiple columns

Hey! 
I am in need of help with a RLS issue and filtering data. We have used bookmarks/buttons to help seperate Seller, Admin, and Manager sales amounts (parameters didn't work due to blank Admin cells and not being able to filter those out of the totals). Sometimes the Seller is an Admin for other sales and they need the amounts seperated due to the % of the sale that is split. However when they have "Seller" filtered, it isn't just showing that one users Seller sales it is showing their Admin sales as well, causing it to over inflate the seller total. 
Base table:

Sales IDAmountSellerAdminManager
1

 $    5,735.00

John DoeJane DoeAnyone
2

 $    9,176.00

Jane Doe Anyone
3

 $    8,558.00

John DoeJane DoeAnyone
4

 $    2,406.00

Jane DoeJohn DoeAnyone
5

 $    3,422.00

John Doe Anyone
6

 $    7,733.00

Jane DoeMike GuyAnyone
7

 $    7,967.00

Jane Doe Anyone
8

 $    1,335.00

Mike GuyJohn DoeAnyone
9

 $    1,010.00

Mike GuyBobby AnnAnyone
10

 $    3,850.00

John DoeBobby AnnAnyone


Currently filtering like this:
 

 John DoeSeller  
Sales IDAmountSellerAdminManager
1

 $    5,735.00

John DoeJane DoeAnyone
3

 $    8,558.00

John DoeJane DoeAnyone
4

 $    2,406.00

Jane DoeJohn DoeAnyone
5

 $    3,422.00

John Doe Anyone
8

 $    1,335.00

Mike GuyJohn DoeAnyone
10

 $    3,850.00

John DoeBobby AnnAnyone



I have setup RLS as the following:
"Show Data is Any of these rules are true"
Seller Email = userprincipalname()
Admin Email = userprincipalname()
Manager Email = userprincipalname()

Should filter:

     
 John DoeSeller  
Sales IDAmountSellerAdminManager
1

 $    5,735.00

John DoeJane DoeAnyone
3

 $    8,558.00

John DoeJane DoeAnyone
5

 $    3,422.00

John Doe Anyone
10

 $    3,850.00

John DoeBobby AnnAnyone
  $  21,565.00   



and 

 John DoeAdmin  
Sales IDAmountSellerAdminManager
4

 $    2,406.00

Jane DoeJohn DoeAnyone
8

 $    1,335.00

Mike GuyJohn DoeAnyone
  $    3,741.00   



Is there a way to filter the bookmarks/buttons so it pulls the just that users under the correct category? or is there something I need to change in the RLS setup?

Thank you!!!! 

6 REPLIES 6
sergej_og
Super User
Super User

Not sure to have catched it right.
Do you have already implemented/defined RLS groups (Desktop) and maybe assigned users to these groups (in Service)?

Regards

We did try that already, having seperate groups but it still displays the same result over stating the sales. Since the user can be in multiple groups it keeps pulling data that isn't relevant to them in one category but is in another category.

Just copied your data above and tried to set RLS.
Result:

sergej_og_0-1713992716647.pngsergej_og_1-1713992734065.png

RLS is set up this way:

sergej_og_2-1713993014338.pngsergej_og_3-1713993030042.png


Regards

This may be a stupid question, we did try that method but the user can't choose their role correct?

So when both roles are selected you will get the results I was getting before. We added buttons to try and seperate the two roles but still not effective at seperating the roles (parameters didn't quite work either).

Of course it will. What do you expect as a result when you select two roles.
When "John Doe" is evaluated PBI will show the result set.
Why would you use both roles at the same time? You are Seller or Admin role.
Does it make sense to establish RLS in that case?

That`s my undestanding on this topic.

Regards

They get their bonus' on both their Seller and Admin accounts. They need to see both roles but seperate since Admins are calculated differently so if John Doe is the Admin but not the seller he shouldn't see that sellers totals in his seller total. They do hold both roles. 

We don't want Sellers or Admins to be able to filter to anyone but themselves, is there another way to restrict data similar to this without RLS?

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.