Forum Discussion
Different RLS criterias on different sheets
- 7 years ago
Finaly managed to solve this problem!
I created a new merged query in PowerQuery with all activityID and IncidentID.
Added one column for owner of Incident
Added one column for owner of Activity
Set relationship from Incident->Securitytable->Activity
Created a RLS role for this new Table:
('Security CaseActivity'[BusinessUnitIncident] = 'Affärsenhet'[Min affärsenhet])
||
('Security CaseActivity'[BusinessUnitActivity] = 'Affärsenhet'[Min affärsenhet]) - 7 years ago
The saga continues. The soloution was working but was way to slow in production.
So now I have another new working solution that is fast!
Ended up merging my Incidents and Incident releted Activitys. So now I only have 1 fact table to work with. Can thereby create a Row level security Role using UserPinciplenamn() and two filters looking for Business Unit on Incident OR Business Unit on Acitivity.
-----
[Businessunit Incident] = [My Business Unit]
||
[Businessunit Activity] = [My Business Unit]-----
[My Business Unit] is a measure on Dimension Business unit:
= LOOKUPVALUE('SystemUser'[businessunitid];'SystemUser'[internalemailaddress];USERPRINCIPALNAME();'SystemUser'[isdisabled];False())
Yes I used view as Role.
The Problem is that the two pages needs to filter the Case table in different ways.
Page 1 needs to show 800 rows
Page 2 need to show 850 rows
If I create a RLS that supports page 1. Page 2 will be missing 50 rows since it's filtered out with the security filter.
Hi Bian ,
That means you need to adjust the conditions. If the conditions conflict with each other, I'm afraid the RLS could not be the solution.
BTW, can you share the details of the conditions?
Best Regards,
- Bian7 years agoHelper II
Finaly managed to solve this problem!
I created a new merged query in PowerQuery with all activityID and IncidentID.
Added one column for owner of Incident
Added one column for owner of Activity
Set relationship from Incident->Securitytable->Activity
Created a RLS role for this new Table:
('Security CaseActivity'[BusinessUnitIncident] = 'Affärsenhet'[Min affärsenhet])
||
('Security CaseActivity'[BusinessUnitActivity] = 'Affärsenhet'[Min affärsenhet])- Bian7 years agoHelper II
The saga continues. The soloution was working but was way to slow in production.
So now I have another new working solution that is fast!
Ended up merging my Incidents and Incident releted Activitys. So now I only have 1 fact table to work with. Can thereby create a Row level security Role using UserPinciplenamn() and two filters looking for Business Unit on Incident OR Business Unit on Acitivity.
-----
[Businessunit Incident] = [My Business Unit]
||
[Businessunit Activity] = [My Business Unit]-----
[My Business Unit] is a measure on Dimension Business unit:
= LOOKUPVALUE('SystemUser'[businessunitid];'SystemUser'[internalemailaddress];USERPRINCIPALNAME();'SystemUser'[isdisabled];False())