OpenBI Docs Buy

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> )
ParameterTypeDescription
tableTableA 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 ALL of 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 ALL of the same table.
  • Give it a table of the model, and use it only as a filter of CALCULATE or CALCULATETABLE. For the rows of a table, use ALL.

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]LitersALLCROSSFILTERED ( Sales )ALL ( Sales )
Beer150538918064631806463
Cider30107418064631806463

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 thereALL ( Products )ALLCROSSFILTERED ( Products )
Depot(blank)(blank)4
Shop444

ALL, REMOVEFILTERS, CROSSFILTER, ISCROSSFILTERED, CALCULATE.

Last updated · OpenBI Studio 0.3.74