Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Crossfilter and row level security



I have the following model for a report:


I've been asked to implement RLS and I'm having some trouble figuring out the correct method. 


In my original model table 1 does not exist and is not required. Table 1 is added for RLS amd contains a list of users email addresses, and the IDs which represent the rows I want the fact table, table 2, to filter to. One ID can be accessed my multiple users in table 1 which is why it is a many>many relationship. The RLS is setup to use Userprinciple name to filter table 1 and subsequently table 2. This element seems to work fine, as I can see when RLS is applied, table 2 does filter to the correct IDs the person in table 1 has access to. Due to table 2 being the fact table and on the many of the many>one side, it does not pass these filters through to the associated dimension tables. 


I have been reading into this as it is new to me, and thought I could use crossfilter within my measures to make the filters flow through to the dimension tables. As an example, for a measure that counts the rows in table 3 I thought I could try something like the below to count the total rows in table 3, but only for the rows which match those filtered in table 2:


CountRowsTable3 = CALCULATE(




When I do this calc I still get the total number of rows in table 3 without the RLS applied. 


Grateful for any steers on the best way to do this, or if I am down totally the wrong track happy to be told so too!

Thank you

Community Support
Community Support

Hi @Scocal123,

I'd like to suggest you check the relationship direction to confirm these filter effect can correctly apply through these table relationship mappings.(single direction relationship only work on one side, you may need to modify some of them to both direction)

What is the Direction of Relationship in Power BI? - RADACAD

Xiaoxin SHeng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you for the response.

I have tried your suggestion. In the example above, when I use 'View as role' to check the RLS, I can see that table 1 filters to 2 rows with 2 IDs which is correct. These 2 IDs from table 1 succesfsully filter table 2. I have set the relationship direction to 'both' between table 2 and 3, but it does not perform any filters on table 3 and I am struggling to understand why. Any advice would be appreciated. 

Kind Regards

HI @Scocal123,

It sounds strange, I'd like to suggest you extract these three table to a standalone report to exclude other filter effects and try again.


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors