Forum Discussion

AshPeep's avatar
AshPeep
Regular Visitor
3 years ago
Solved

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...
  • DataInsights's avatar
    3 years ago

    AshPeep,

     

    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).