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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Advocate II
Advocate II

Relationship filtering on many to one doesnt filter



I have several tables all linked to each other. What I am finding is that the filtering from many to one doesnt respond. If I filter on the one to many side then the many table information changes. However if I filter on the reverse from the many side then the one table is not impacted (using bi-directional filtering).



A user is assigned to multiple sites. The users table contain the user information and the multiplesites table is the table that contains the userid and the siteid that user is assigned to:

So user 123 can be assinged to site 1, 2, 5 and 6 for example.

When I filter on the sites table then the multiplesites table filters and so does the daily table.  But when I filter on the daily or on the multiplesites table the filtering doenst activate. I.e. when I filter on the many to one direction (initially the daily to sites was also bi-directional) it doesnt filter the one site, just the many side of the relationship.


Any ideas?

Much appreciated.


Ok, update, cause I think that I have bothered enough.


The solution that worked was to select the "Apply security filter in both directions" options on the relationship. I swear I did this before and it didnt work but for now it does.

View solution in original post


Hi @duggy,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?



Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Solution Sage
Solution Sage

It has to do with filter context.  The filter context wont' flow against the arrows of your 1:M relationships. You need to explicitly define the context in your measures. If your not writing measures but letting the visual define it for you by just dragging in the column you  will need to define explicit meausres and then force the filter context.  


You can do this a variety of methods  see the tutotial I put together.!AuCIkLeqFmlhhJgzLZ6jPcWgLGu3Yw

Thank you for the file, am busy looking through it and trying to implement.

Just to clarify, this is the solutoin that when I select a user in the multiple table (multiplesites) then the single table (sites) will only show the sites that the user is assigned to (from the multiplesites table that has the userid and the siteid).


When I do this graphically in powerbi charts they seem to respond correctly (select the user, the list of the sites the user is assigned to is displayed and the totals for the sites is displayed).


I am however passing the userid through Managed Roles. So that when the graphs are embedded the logged in user can only see his data for his sites.


We still ont he same page and your solution will correct for this?


Much appreciated.

I am not sure that this is what I am looking for, or possibly I am not understanding it.

The simple issue that I am having is when I select the user in Manage Roles for the mutiplesite, I see the filer of data for all the sites the user is associated with.


So if user 123 is associated with sites 9, 10, 11 then the multiplesites table looks like:




I expect that when the managed roles user of 123 is selected then this is the result (this is indeed happening in the multiplesites table)

However in the sites table, the filter is not carrying through. I have a sites table with:


9Site 1
10Site 2
11Site 3
12Site 4
13Site 5
14Site 6


The goal is that when the multiplesites is filtered through managed role userid 123 then the sites table would filter the data to:

9Site 1
10Site 2
11Site 3


At the moment the sites table is not responding at all.


Much appreciated.


Hi @duggy,

From your data structure, it could work on my side:

Sample data:




I would suggest you test again. If issue persists, would you please share your pbix file if possible? Also you can test with our sample report on your side to see if the same issue occurs.



Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ok, I see the issue you have. Change the data to as follows (and you will see the issue that I am having):

on table multiplesites change the user 124 to have siteid 9 and 10. Meaning that user 123 is assigned to site 9, 10 and 11 and user 124 is also assigned to 2 of the 3 sites user 123 is assigned to (a subset of the same sites) - sites 9 and 10.


Then you will have the same issues that I am having which I need to try solve for.


This means that userA can be assigned to site 1,2 and 3 and userB can also be assigned to sites 1,2 and 3. At the moment if they are all assigned to different sites it will work, but if they are assigned to same sites or subset of sites it doesnt filter through.


The only way I was able to solve this (a VERY ugy and repettive way) was to merge the sites and the multiplesites table based on sitesid. This means the sites table now has multiple rows for each site (a row for each userid).


So a site that is allocated to 10 users (where the sites table had one row) now the sites table has 10 rows each with a different user, very ugly way of doing it. Need to undo it and look at something proper.

Ok, update, cause I think that I have bothered enough.


The solution that worked was to select the "Apply security filter in both directions" options on the relationship. I swear I did this before and it didnt work but for now it does.

Thankyou for coming back to report this

Great, glad to hear.  Note there are many situatation where you cannot apply crossfiltering in both directions or not enough of them so I would recommending learning how to force crossfiltering for specific measures.  I can't access drop box from work so I can't demonstrate in the solution provided by @v-danhe-msft 

It’s the filter context. The relationship is from Sites -> DailyEntrance is sites is NOT normally filtered by daily entrance.

If the measure your displaying is [measure] try
NewMeasue = CALCULATE([measure],sites)

This will force that relationship to be applied.  

If it’s not working you may need to force a relationship with a different or additional tabales, or you coudl build and share a sample PBIX file.

See this updated example with a more complex relationship that more closely mirrors yours.!AuCIkLeqFmlhhJgzLZ6jPcWgLGu3Yw



Thank you for the response. I am not sure I follow you. Sites to dailyentrance filtering is working. When I filter sites then the dailyentrance is filtering correctly.


Multiplesites to sites is not filtering correctly. When I Manage Roles to multiplesites by user (then the siteid remains for the given user) then Sites is not filtering.


Does this mean that I need to add something like (INTO SITES):

NewMeasue = CALCULATE(sites[siteid],multiplesites[siteid]) ?

in order to filter sites by the filtered siteid in multiplesites?


Please post an example.

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.