All DAX Functions

ALL, ALLEXCEPT and ALLSELECTED

Control how measures obey slicers and visual row filters.

On this page

Overview

The ALL family removes or ignores parts of the filter context so measures can show totals, rankings, or percentages that behave correctly inside visuals and slicers.

ALL()

  • Removes filters from the specified columns or entire table.
  • Ignores both page slicers and visual row/column filters for those columns.
  • Common in % of Grand Total and static RANKX denominators.
Syntax Examples
// Remove all filters on the Product table
ALL ( Product )

// Remove filters on Category only
ALL ( Product[Category] )

// Use inside CALCULATE
% of Total Sales =
DIVIDE(
    [Total Sales],
    CALCULATE( [Total Sales], ALL ( Product[Category] ) )
)

ALLEXCEPT()

  • Removes all filters on a table except the columns you list.
  • Keeps the current visual row context for those columns (e.g., Category).
  • Ideal for rank within category or segment-level percentages.
Syntax Examples
// Keep Category filter, remove Product and other columns
ALLEXCEPT ( Product, Product[Category] )

Rank in Category =
RANKX(
    ALLEXCEPT ( Product, Product[Category] ),
    [Total Sales],
    ,
    DESC
)

ALLSELECTED()

  • Removes filters from inside the visual, but keeps page/report slicers and cross-filtering from other visuals.
  • Reflects what the user selected on the page, not the full database.
  • Use for % of Visible Total in the current report view.
Syntax Examples
% of Selected Total =
DIVIDE(
    [Total Sales],
    CALCULATE( [Total Sales], ALLSELECTED ( Product ) )
)

// Often used with KEEPFILTERS for advanced patterns
CALCULATE(
    [Total Sales],
    ALLSELECTED ( 'Date'[Year] )
)

Quick Comparison

ALL vs ALLEXCEPT vs ALLSELECTED

DAX FunctionObeys Page Slicers?Obeys Visual Row Filters?Primary Use Case
ALLNoNoGrand totals, global ranks, remove all context on columns
ALLEXCEPTNoYes (for kept columns)Subtotals within a dimension (rank in category)
ALLSELECTEDYesNo (inside visual)% of what the user filtered on the page