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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jasperj101
Frequent Visitor

Bi-Directional Filter Behaviours

Good Afternoon All, 

 

I have come across some issues when using bi-directional relationships, it would be great if you could share some explanations and further reading sources to help me understand the following behaviour: 

 

The crux of my issue is, clearing filters in a dimension table using ALL() / REMOVERFILTERS() does not remove filters that have propagate through a bi-directional relationship. 

 

I have made a simple model to demonstrate this: 

 

jasperj101_0-1726487377730.png

Customers has a many to 1 relationship with territories (which region they are in the country) which is a single direction, were territories can filter the customer list. Customers also has a one to many bi-directional relationship with Tags, this is a table that has many 'Tags' defined for customers such as if they are part of a reward scheme and various different metrics. This needs to be bi-directional in my use case as the model needs to calculate measures over tags with a customer context and also measures over customers with a tags context. 

 

I then display a measure that counts all customers regardless of filter context: 

jasperj101_1-1726487511643.png

As you can see, when displayed, even if there is a page filter for 'Territories'[Area], this filter context will be ignored and it will give the total count of customers 7: 

jasperj101_2-1726487651121.png

However, when using that same measure and applying a page filter to 'Tags'[Tag_Description] it returns:  

jasperj101_3-1726488404404.png

 

In this instance, the ALL() filter does not clear the filter propagated through the bi-directional relationship.

 

If I clear filters from the tags table, this does fix the issue. However, in my real scenario there are many such tables and the potential it will scale into more in the future, which will result in me needing to add new filter conditions to many different measures each time a new table is added... 

 

Any explanations/help on this issue would be greatly appreciated! 

 

Cheers,

J

 

 

4 REPLIES 4
danextian
Super User
Super User

Hi @jasperj101 

 

I tried to mimic your table but I think I am missing something as my test shows that ALL applied to customers returns ALL regardless of the filters applied to it from either of the other tables.

danextian_0-1726490891127.png

danextian_1-1726490931037.png

It is always a good practice to post a sample data/pbix and not just images. That aside, try including ALL (Tags) inside CALCULATE as well.

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @jasperj101 

 

When enabling the bidirectional cross filter, once you filter one table, you also filter all the tables on the “one” side of a relationship.

So when you filter rows on Tags, you implicitly filter Territories and Customers, thus affect the result.

Here is a sample for your reference:

Row Context and Filter Context in DAX - SQLBI

vzhengdxumsft_0-1726728523452.png

To solve this, you can add a ALL(Tags) to clear the implicit filtering:

vzhengdxumsft_1-1726728744009.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-zhengdxu-msft

 

Many thanks for the reply, the solution you have provided is the way I have already solved this. 

 

However, I am still not understaning the different ways the implicit filtering is working in this model. Am I correct that the definition of implicit filtering is a filter that has propagated through a relationship from an explicit filter in another table? 

 

If that is correct, the implicit filter that propagates from Territories > Customers through the many to one relationship gets ignored when using ALL(Customers). However, the implicit filter propagating from Tags > Customers through the many to one bi-directional filter does not get cleared by ALL(Customers), still not understanding why the bi-directional relationship acts differently... 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.