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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
pablorturco
New Member

Manage Multi-Hierarchy Roles

Hey all !

 

I am trying to set a different view of my report depends on the user who opens the report. 

I have 3 differents levels of categories. (Like in the picture)

pablorturco_0-1640619953611.png

pablorturco_1-1640620104197.png

                          (SubCategory Table)

 

And I have a 'Permission Table' that contains the acces level to all of the users who are going to read the report. It looks like this

pablorturco_2-1640620186622.png

 

And then, there is a Transaction Table, where there is all the information about transacions related to a SubCategory and a few more columns with more details like 'Date', 'Sales' and 'TransacionName'. 

 

I need to create a Role Hierarchy that the Transacion table is filtered depending on the user( email) and the level of access. For example.

  •        username3 can acces only to data related to SubCategory = id06
  •        username2 can see all the subcategories whithin x3 PreCategory
  •        username1 will see all the PreCategories and Subcategories within Category = RD

 

I have tried many solutions. I started creating different relations between the permission table and the category hierarchy (all 3 tables) but PowerBI doesnt allow you to create several bidirectionals relations starting in the same table. 

 

Also i have try to specify this relations in the DAX expression belonging to the Role. So I Set a Role called RLS and looks like this.

 

ROLE RLS

 

TABLEFILTERDAX EXPRESSION
CATEGORYYES

[Category] =
     CALCULATE(
MAX('Master'[Filter]),
  FILTER(Master,
'    Master'[Level] = 3),  USERELATIONSHIP('Permissions'[user],'Master'[login])
)

 

 

PRECATEGORYYES [PreCategory] =
CALCULATE(
MAX('Master'[Filter]),
FILTER(Master,
'Master'[Level] = 2),
USERELATIONSHIP('Permissions'[user],'Master'[login])
)
SUBCATEGORYYES            [SubCategory] =
     CALCULATE(
MAX('Master'[Filter]),
  FILTER(Master,
'    Master'[Level] = 1),  USERELATIONSHIP('Permissions'[user],'Master'[login])
)
PERMISSIONSYES         [username] = USERPRINCIPALNAME()
TRANSACTIONS        NO 

 

Table MASTER  is a summary of the PERMSSIONS TABLE that helps me to distinguish which filter is used depending on the user.

Table master looks like this:

 

LoginLevelFilter
username1@random.com3         RD       
username3@random.com1id06
username3@random.com2x3
username3@random.com3RD
username2@random.com2x3
username2@random.com3RD
username4@random.com        3YL
username4@random.com        2x7
username5@random.com       3YL
username6@random.com     1id13
username6@random.com2x8
username6@random.com3YL

 

This solution isnt working properly but i cant see any other better options. 

 

Hope you understand this problem and could help me with any tips.

 

Thank you in advance ! 

1 REPLY 1
lbendlin
Super User
Super User

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.