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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
DirkVr
Frequent Visitor

Dynamic RLS with Dynamic Organization structure

I am trying to setup RLS using Hierarchical Organization structure. Users are not stored in Active Directory.

The following business rules apply

  • A organization unit can have one or more sub-organizationunits
  • The hierarchy is ragged, meaning the number of sub-organizationunits can vary in the tree (let's say up to max 5 levels)
  • A user can have access to multiple organization unit. For instance we have on the highest level 3 regions (region1, region2 and region3). Person X can have to Region1 and Region3. 
  • A organization unit can have multiple users.

On data level this corresponds to the following tables :

  • A fact table where each record contains a Foreign Key (OrganizationUnitId) towards the OrganizationUnit table
  • Dim_organization_unit which contains for each OU a record. IN this record we calculate the OUPath (using PATH function) and calculate up to 5 level-columns.
  • A user table containing all users know in the system
  • A link table (named "UserOrganizationUnit") which links a user to one or more Organization Units and vice versa.

I want to come to a RLS security, where the logged in userid is sent via CustomData to Power BI. Using the userid, I want to filter out all facts which belongs to the OrganizationUnit where the user belongs too PLUS all his sublevels.

 

Any tips how I should do this?

 

Below my datastructure

DirkVr_0-1687272574796.png

 

 

 

0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.