cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply

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 4
visheshjain
Solution Supplier
Solution Supplier

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

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hi @visheshjain ,

 

I tried writing the DAX but was not able to form the complete expression.

If you could please help me with the same.

 

Thanks in advance!

Hi @veenashenolikar,

 

Please refer to this doc USERELATIONSHIP function (DAX) - DAX | Microsoft Learn

 

Also, I can give it a shot, if you can share your sample file.

One more thing, you will need to replace ALL in your Gender column with 2 rows, unless you have the value 'All' in your data as well.

 

Thank you,

Vishesh Jain

Did I answer your question?
If yes, then please mark my post as a solution!

Thank you,
Vishesh Jain

Proud to be a Super User!



Hi @visheshjain ,

 

I am handling the ALL using a crossjoin with the dimesion table and a custom column.

 

I will send over the sample file for your perusal

 

Thanks,

Veena

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors