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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.