Switch a relationship off with CROSSFILTER NONE
Turn off the Customer–Sales relationship inside one calculation with CROSSFILTER NONE to compare a region with all customers.
You will learn to
- Disable a relationship for one calculation with CROSSFILTER NONE
- Keep other filters (product, date) working
- Compare CROSSFILTER NONE with ALL
How it works
`CROSSFILTER(many-side column, one-side column, direction)` changes how one relationship behaves, only inside a `CALCULATE`. The direction can be **BOTH**, **ONEWAY** or **NONE**.
With **NONE** the relationship is switched off: filters on that dimension can’t reach the fact table any more. `CALCULATE([Total Sales], CROSSFILTER(Sales[CustomerKey], Customer[CustomerKey], NONE))` is sales for **all** customers, while filters on Product and Date still apply, because their relationships are untouched.
The result is often the same as `ALL(Customer)`. The difference is in what it says: ALL removes the filters on Customer; NONE leaves them in place but stops them from travelling to Sales. Reach for NONE when you want to ignore one specific relationship, for example a role-playing one.
Practice it hands-on with a real data model and a live report that updates as you type.
Sales Any Product = CALCULATE([Total Sales], CROSSFILTER(Sales[ProductKey], Product[ProductKey], NONE))