- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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 ID | Amount | Seller | Admin | Manager |
1 | $ 5,735.00 | John Doe | Jane Doe | Anyone |
2 | $ 9,176.00 | Jane Doe | Anyone | |
3 | $ 8,558.00 | John Doe | Jane Doe | Anyone |
4 | $ 2,406.00 | Jane Doe | John Doe | Anyone |
5 | $ 3,422.00 | John Doe | Anyone | |
6 | $ 7,733.00 | Jane Doe | Mike Guy | Anyone |
7 | $ 7,967.00 | Jane Doe | Anyone | |
8 | $ 1,335.00 | Mike Guy | John Doe | Anyone |
9 | $ 1,010.00 | Mike Guy | Bobby Ann | Anyone |
10 | $ 3,850.00 | John Doe | Bobby Ann | Anyone |
Currently filtering like this:
John Doe | Seller | |||
Sales ID | Amount | Seller | Admin | Manager |
1 | $ 5,735.00 | John Doe | Jane Doe | Anyone |
3 | $ 8,558.00 | John Doe | Jane Doe | Anyone |
4 | $ 2,406.00 | Jane Doe | John Doe | Anyone |
5 | $ 3,422.00 | John Doe | Anyone | |
8 | $ 1,335.00 | Mike Guy | John Doe | Anyone |
10 | $ 3,850.00 | John Doe | Bobby Ann | Anyone |
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 Doe | Seller | |||
Sales ID | Amount | Seller | Admin | Manager |
1 | $ 5,735.00 | John Doe | Jane Doe | Anyone |
3 | $ 8,558.00 | John Doe | Jane Doe | Anyone |
5 | $ 3,422.00 | John Doe | Anyone | |
10 | $ 3,850.00 | John Doe | Bobby Ann | Anyone |
$ 21,565.00 |
and
John Doe | Admin | |||
Sales ID | Amount | Seller | Admin | Manager |
4 | $ 2,406.00 | Jane Doe | John Doe | Anyone |
8 | $ 1,335.00 | Mike Guy | John Doe | Anyone |
$ 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!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Just copied your data above and tried to set RLS.
Result:
RLS is set up this way:
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
Subject | Author | Posted | |
---|---|---|---|
08-23-2024 06:04 AM | |||
11-02-2024 09:07 PM | |||
11-27-2024 12:20 AM | |||
02-28-2024 04:43 AM | |||
11-12-2024 07:16 AM |
User | Count |
---|---|
141 | |
115 | |
83 | |
63 | |
48 |