ALLCROSSFILTERED
As a filter of CALCULATE, removes every filter on a table, those reaching it through relationships too.
Group: Filter. Compatible with DAX.
Syntax
ALLCROSSFILTERED ( <table> )
| Parameter | Type | Description |
|---|---|---|
table | Table | A table of the model whose filters are removed, wherever they come from. |
Returns
Filter. No value of its own: it takes filters away from the CALCULATE or CALCULATETABLE it is in.
Remarks
- It removes what
ALLof the same table removes, the filters of the table and of the tables it reaches, and on top of that every filter that arrives through a relationship filtering both ways or a many-to-many relationship. - In a model where each relationship filters one way only, as in the Example Brewery, it gives the same answer as
ALLof the same table. - Give it a table of the model, and use it only as a filter of
CALCULATEorCALCULATETABLE. For the rows of a table, useALL.
Examples
In a star schema, the same as ALL
EVALUATE
SUMMARIZECOLUMNS (
Products[Category],
"Liters", [Liters sold],
"ALLCROSSFILTERED ( Sales )", CALCULATE ( [Liters sold], ALLCROSSFILTERED ( Sales ) ),
"ALL ( Sales )", CALCULATE ( [Liters sold], ALL ( Sales ) )
)
ORDER BY Products[Category]
| Products[Category] | Liters | ALLCROSSFILTERED ( Sales ) | ALL ( Sales ) |
|---|---|---|---|
| Beer | 1505389 | 1806463 | 1806463 |
| Cider | 301074 | 1806463 | 1806463 |
A filter that comes through a both-ways relationship
The outer CALCULATE makes the relationship between Sales and Products filter both ways, as a both-ways relationship in a model would. The depot sold nothing, so no product is seen from it. ALL of Products cannot lift that, as the filter sits on Places; ALLCROSSFILTERED can.
EVALUATE
ADDCOLUMNS (
VALUES ( Places[Kind] ),
"Products sold there",
CALCULATE ( COUNTROWS ( Products ), CROSSFILTER ( Sales[Product], Products[Product], BOTH ) ),
"ALL ( Products )",
CALCULATE (
CALCULATE ( COUNTROWS ( Products ), ALL ( Products ) ),
CROSSFILTER ( Sales[Product], Products[Product], BOTH )
),
"ALLCROSSFILTERED ( Products )",
CALCULATE (
CALCULATE ( COUNTROWS ( Products ), ALLCROSSFILTERED ( Products ) ),
CROSSFILTER ( Sales[Product], Products[Product], BOTH )
)
)
ORDER BY Places[Kind]
| Places[Kind] | Products sold there | ALL ( Products ) | ALLCROSSFILTERED ( Products ) |
|---|---|---|---|
| Depot | (blank) | (blank) | 4 |
| Shop | 4 | 4 | 4 |
Related functions
ALL, REMOVEFILTERS, CROSSFILTER, ISCROSSFILTERED, CALCULATE.