Forum Discussion
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!!!!
6 Replies
- sergej_ogSuper 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- jessimica1018Helper II
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.
- sergej_ogSuper User
Just copied your data above and tried to set RLS.
Result:RLS is set up this way:
Regards