Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
SSirozza
New Member

RLS overriding DAX

Hi Team,

I have this issue that I'm trying to resolve for a month now but so far no luck. Hoping you will be able to crack it.

My data model consists of the following:

1. Dimension table: "HRMS Cost Center - Company - Division"

2. Fact tables: (1) Headcount, (2) Separations, (3) Mobility

 

Dimension table is connected to all thre fact tables via cost center field. This connection is then used to map the division within all three fact tables, but it is not pushed as a column to the Fact Table.

 

For RLS, Dimension table is set for user as: [Division] = "Finance" which achieves the desired goal of only unlocking the matching rows in (1) Headcount and (2) Separations dimension tables.

The issue however is that the Mobility Table contains "Old Cost Center" and "New Cost Center" values. 

Currently, due to BI forcing one connection, the dimension is connected on "Old Cost Center". This implies that the user with [Division] = "Finance" role only sees the mobility rows where "Old Cost Center" is found. 

What I need however is for it to show all values in Mobility table where "Finance" is mapped against "Old Cost Center" OR "New Cost Center".

Once again, it is very important to maintain the Dimension Table-level RLS, but somehow override that for the Mobility fact table to show more than just Old Cost Center.

 

Any help would be apprieciated.

 

Thanks!

2 REPLIES 2
tamerj1
Super User
Super User

Hi @SSirozza 
Can you provide some screenshots of the data model. What security roles have you created?

Hi @tamerj1 - thanks for your reply.

Below is the screenshot of the model (some other dimensions are there but irrelevant at this stage).

With the higlighter I have higlithed one to many relationship and the field. 

The red circle is the field that should be included in the OR for the Mobility Table.

 

As for the security roles, there are literally only 2 in the "HRMS Cost Center - Company - Division" dimension table:

1. Role 1 is Human Resources user where dimension table is [Division] = HR

2. Role 2 is Finance user where dimension table is [Division] = Finance.

 

Role 1 and role 2 need to see the matching rows in Fact Tables.

For Headcount and Separations fact tables this is already achieved, but currently the mobility table is "sliced" on old cost center only, while the expected outcome is old OR new cost center, wherever "Finance" is found.

 

SSirozza_0-1695036884814.png

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors