Forum Discussion
Help to understand the example given in CROSSFILTER function
- 1 year ago
Sales[CustomersFiltered]: This measure considers the bidirectional relationship between Sales and Customer. If there are any filters applied to the Product table, they will still affect the Sales table indirectly through the Customer table.
Sales[ProductsDoesNotFilter]: This measure explicitly disables the relationship between Sales and Product. This means that any filters applied to the Product table will not affect the Sales table at all. However, the bidirectional relationship between Sales and Customer remains active.
The key difference is that the third measure isolates the Sales table from any filtering effects of the Product table, ensuring that only the relationship between Sales and Customer is considered where as the second measure considering filtering effects of the product table indirectly.
Hope this clearify the confusion!!
Thanks for your quick response shafiz_p.
Yes, I understand the line CROSSFILTER ( Sales[ProductKey], 'Product'[ProductKey], NONE ) disables the filtering effect between tables Product and Sales, but the other line CROSSFILTER ( Sales[CustomerKey], Customer[CustomerKey], BOTH ) still applies a filtering effect between tables Customer and Sales, thus the third column/measure should have returned the same values as the second column/measure, don't you think? What's the point of having both CROSSFILTER in the third measure?
Sales[CustomersFiltered]: This measure considers the bidirectional relationship between Sales and Customer. If there are any filters applied to the Product table, they will still affect the Sales table indirectly through the Customer table.
Sales[ProductsDoesNotFilter]: This measure explicitly disables the relationship between Sales and Product. This means that any filters applied to the Product table will not affect the Sales table at all. However, the bidirectional relationship between Sales and Customer remains active.
The key difference is that the third measure isolates the Sales table from any filtering effects of the Product table, ensuring that only the relationship between Sales and Customer is considered where as the second measure considering filtering effects of the product table indirectly.
Hope this clearify the confusion!!