DAX Reference Library

The Essential DAX Dictionary

Precise explanations for critical Power BI concepts with syntax, evaluation mechanics, and live practice challenges.

Aggregations

DAX SUM Function

SUM adds all numbers in a column. It automatically respects the current filter context set by slicers, rows, columns, and visual filters.

SUM( Table[Column] )
Context & Filtering

DAX CALCULATE Function

CALCULATE evaluates an expression within a modified filter context. It is the only function in DAX that can create, modify, or override existing filter context.

CALCULATE( Expression, [Filter1], [Filter2], ... )
Context & Filtering

DAX FILTER Function

FILTER iterates row-by-row over a table and returns a new virtual table containing only rows where the boolean expression is TRUE.

FILTER( Table, FilterExpression )
Iterators

DAX SUMX Function

SUMX iterates over a table, creates a row context for each individual row, computes an expression, and sums the results.

SUMX( Table, Expression )
Iterators

DAX AVERAGEX Function

AVERAGEX iterates over a table, evaluates an expression for each row, and computes the arithmetic mean of the resulting values.

AVERAGEX( Table, Expression )
Context & Filtering

DAX SELECTEDVALUE Function

SELECTEDVALUE returns the value of a column when there is only one distinct value in the current filter context; otherwise returns an alternate result.

SELECTEDVALUE( Column, [AlternateResult] )
Advanced

DAX SWITCH Function

SWITCH evaluates an expression against a series of values and returns the corresponding result. The SWITCH(TRUE(), ...) pattern enables powerful multi-condition branching.

SWITCH( Expression, Value1, Result1, [Value2, Result2, ...], [Else] )
Advanced

DAX RANKX Function

RANKX computes the rank of an expression across a given table or set of dimension keys in the current visual context.

RANKX( Table, Expression, [Value], [Order], [Ties] )
Time Intelligence

DAX Time Intelligence

Time Intelligence functions simplify temporal calculations: Year-to-Date, Month-over-Month, and moving averages.

TOTALYTD( Expr, Dates ), SAMEPERIODLASTYEAR( Dates ), DATEADD( ... )
Context & Filtering

Understanding Filter Context

Filter Context is the cumulative set of filters applied to the semantic model by slicers, visual axes, filters pane, and cross-highlighting.

Conceptual foundation
Context & Filtering

Understanding Row Context

Row Context refers to the awareness of the current row being scanned. It exists automatically in calculated columns and is created by iterators like SUMX and FILTER.

Conceptual foundation
Advanced

DAX Context Transition

When CALCULATE is evaluated inside an active row context, it converts the values of all columns in the current row into an equivalent filter context.

Implicitly triggered when invoking measures inside iterators or calculated columns.