Forum Discussion

veenashenolikar's avatar
3 years ago

Row Level Security with multiple conditions

Hello,

 

I am facing an issue to setup RLS in my datamodel .

The scenario is as follows -

 

I have a security table which enlists information as - (Please note this is sample data)

ProfessionGenderLocationEmail Address
AllFemaleIndiaM
LawyerAllUSR
DoctorMaleChinaS
EngineerMaleAllA
AllAllUKN
LawyerAllGermanyR
DoctorMaleAUD
EngineerMaleIndiaS
AllAllDubaiH

 

The user H gets to see all professions in Male & Female residing in Dubai, however M only sees all Female Professions residing in India. 

I tried to create one RLS table and join to the different Dim - Profession , Dim - Gender & Dim - Location , but as they all are joined to my Fact, it keeps only one relationship active. 

 

If you could please help me out with the same.

 

Thanks!

4 Replies

  • visheshjain's avatar
    visheshjain
    Impactful Individual

    Hi veenashenolikar,

     

    It might sound simple but I have to ask, have you tried using the USERELATIONSHIP() function in your DAX measure for RLS?

     

    The function uses inactive relationships.

     

    Hope this helps.

     

    Thank you,

    Vishesh Jain