ALLCROSSFILTERED

Updated on

ALLCROSSFILTERED is a DAX function that clears all filters applied to the specified table.

Syntax

ALLCROSSFILTERED( TableName )
Argument Properties Description
TableName The table that you want to clear filters on.

Return Values

N/A. See remarks.

Remarks

  • ALLCROSSFILTERED can only be used to clear filters but not to return a table.

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

DEFINE
MEASURE FactInternetSales[TotalQuantity1] =
    CALCULATE(SUM(FactInternetSales[OrderQuantity]), ALLCROSSFILTERED(FactInternetSales))
MEASURE FactInternetSales[TotalQuantity2] =
    CALCULATE(SUM(FactInternetSales[OrderQuantity]), ALL(FactInternetSales))
EVALUATE
    SUMMARIZECOLUMNS(DimSalesReason[SalesReasonName], 
        "TotalQuantity1", [TotalQuantity1],
        "TotalQuantity2", [TotalQuantity2])
    ORDER BY DimSalesReason[SalesReasonName]

Returns,

DimSalesReason[SalesReasonName] [TotalQuantity1] [TotalQuantity2]
Demo Event 60398
Magazine Advertisement 60398
Manufacturer 60398 1818
On Promotion 60398 7390
Other 60398 3653
Price 60398 47733
Quality 60398 1551
Review 60398 1640
Sponsorship 60398
Television Advertisement 60398 730

Note

There is a direct or indirect many-to-many relationship between FactInternetSales table and DimSalesReason table.

Other functions related to ALLCROSSFILTERED are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/allcrossfiltered-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy