Forum Discussion

jasperj101's avatar
jasperj101
Helper I
1 year ago

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: 

 

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: 

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: 

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

 

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

  • 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.

    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.