cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
franciscoep Frequent Visitor
Frequent Visitor

security filter does not work RLS

The security filter does not pass to the other tables, with a simple DAX formula it does not pass, it only filters the table that contains the users with the roles and the fact table, but the other dimensions do not.

Captura con el caso de que no pasa los filtros en el modelo.JPG

 

This is the permissions table, the "CORREO" field has the emails and the "ID_NEGOCIO" field is associated with the fact table.

and use the role in role manager

Tabla de los usuarios.JPG

 

 

 

Dax con el permiso.JPG

 

I can't understand why I don't pass the filters to the other tables.

 

 

3 REPLIES 3
sturlaws New Contributor
New Contributor

Re: security filter does not work RLS

Hi @franciscoep ,

have you remebered to check the "Apply security filter in both directions"-box in the relatiohship dialogs?
security filter does not work RLS.png

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Community Support Team
Community Support Team

Re: security filter does not work RLS

Hi @franciscoep ,

As sturlaws said, I think you need to check 'apply security filter in both directions' option to confirm if you have not enabled security filter across relationships.

In addition, you can also add a measure to display 'userprincipalname' function results to confirm if their result not matched with the mapping table records. (you can also change your formula to use 'username' if 'userprincipalname' function return the wrong result)

Row-level security (RLS) with Power BI#using the username or userprincipalname dax function 

Dynamic Row Level Security with Profiles and Users in Power BI : Many-to-Many Relationship 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
franciscoep Frequent Visitor
Frequent Visitor

Re: security filter does not work RLS

I had previously applied the 'security filter in both directions', but it only works for one relationship and does not happen for the rest of the relationships.

 

solo una relacion con filtro bidireccional.JPG

I already did the test with the formulas, and the security filter does not pass to the rest of the tables, it only passes from the permit to the fact table and from there it only passes to the one that I have applied the security filter, the rest of tables are not filtered

 

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)