DAX Filter - ALL function



Description

Returns all the rows in a table or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.

Syntax

ALL ({<table> | <column>, [<column>], [<column>] …}) 

Parameters

Sr.No. Parameter & Description
1

table

The table that you want to clear filters on.

2

column

The column that you want to clear filters on.

The argument to the ALL function must be either a reference to a base table or one or more references to base columns. You cannot use table expressions or column expressions with the ALL function.

Return Value

The table or column or columns with filters removed.

Remarks

ALL function is not used by itself, but serves as an intermediate function that can be used to change the set of results over which some other calculation is performed.

Example

= COUNTA (Results[Medal])/CALCULATE (COUNTA (Results[Medal], ALL (Results)) 

With this DAX formula, all the rows in the Results table are taken into account in the CALCULATE function with the filter containing the ALL function. This way, you have the total count in the denominator.

dax_functions_filter.htm
Advertisements