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

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

Reply
Anonymous
Not applicable

Problem with RLS

Hi, i have a problem with detecting the kind of filter that i want to apply to my table and i'm really not sure if it possible to do, and if it's not possible then please help me to find out a good option, so the problem is this:

 

i have the next table

 

AlvaroNas_1-1597100850963.png

 

 

as you can see, there are 5 columns with differents atributes and we can rank them (hierarchy) as área-submercado-mercado-compañía-pais (from down to top)

 

and i have this other table to filter depending of the userprincipalname()

 

AlvaroNas_2-1597101191761.png

 

so category is the level of acces the person has and depending of his level i want to filter the preview table, if level is 5 or 6 i want to filter by País, if is 4 i want to filter by compañia, if is 3 i want to filter by mercado,2 for submercado en 1 for área.

 

 

 

 

i have been thinking something like this (the next image) but obviusly can't use Userelationship to this case, but the idea is to identify the level of the user and depending of the level to use one of this 5 relationship, please tell me that is posible!!!!

 

AlvaroNas_3-1597101352880.png

 

Thanke you all for your time 🙂

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , refer if this can help

http://angryanalyticsblog.azurewebsites.net/index.php/2016/12/27/dynamic-rls-via-hierarchy-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
lbendlin
Super User
Super User

If this is truly a hierarchy then you need to fill it properly.  You cannot have blanks in the country field, for example. For the category 3 entry both the country and the company need to be filled etc.

 

If it is not a true hierarchy then you need to develop a better star schema in your data model, and specify for each category where in the outskirts of the star schema your RLS rules need to be applied for each user.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors