Forum Discussion
AshPeep
3 years agoRegular Visitor
RLS When User Key Appears in either To OR From Columns
Background: I have Dynamic RLS sucessfully set up across a broad number of workforce tables using the branch (org code) and the supervisor's UPN to limit access for our department workforce data to o...
- 3 years ago
Add this DAX to the role for table Temporary Assignment:
[Org FROM] IN SELECTCOLUMNS ( FILTER ( 'Supervisor Row Access', 'Supervisor Row Access'[UPN] = USERPRINCIPALNAME () ), "Org", [Org] ) || [Org TO] IN SELECTCOLUMNS ( FILTER ( 'Supervisor Row Access', 'Supervisor Row Access'[UPN] = USERPRINCIPALNAME () ), "Org", [Org] )Temporary Assignment should not have a relationship with Supervisor Row Access (otherwise it would cause filtering to occur on only the column in the relationship).
DataInsights
3 years agoSuper User
Add this DAX to the role for table Temporary Assignment:
[Org FROM]
IN SELECTCOLUMNS (
FILTER (
'Supervisor Row Access',
'Supervisor Row Access'[UPN] = USERPRINCIPALNAME ()
),
"Org", [Org]
)
||
[Org TO]
IN SELECTCOLUMNS (
FILTER (
'Supervisor Row Access',
'Supervisor Row Access'[UPN] = USERPRINCIPALNAME ()
),
"Org", [Org]
)
Temporary Assignment should not have a relationship with Supervisor Row Access (otherwise it would cause filtering to occur on only the column in the relationship).
AshPeep
3 years agoRegular Visitor
This is fantastic, thank you so much!