Back

All DAX Functions

Guides with sample data, syntax-highlighted code, and visual outputs.

15 topics

The CALCULATE() Function: The Engine of DAX

Modify filter context and run aggregations under custom rules.

Read more

The FILTER() Function: Dynamic Row-by-Row Filtering

Scan tables row-by-row for complex filter conditions.

Read more

The RELATED() Function: Fetching Values Across Relationships

Look up dimension values from the one side of a relationship.

Read more

The RELATEDTABLE() Function: Fetching Sub-Tables Across Relationships

Return related fact rows from the many side of a relationship.

Read more

The DIVIDE() Function: Safe Division and Error Handling

Divide safely without division-by-zero errors in visuals.

Read more

SUM vs SUMX: Aggregators vs Iterators Explained

Column-level aggregation versus row-by-row iterators.

Read more

The TOTALYTD() Function: Master Year-to-Date Calculations

Running totals that reset each calendar year.

Read more

AVERAGE vs AVERAGEX: Standard Averages vs Row-by-Row Averages

Single-column averages versus custom per-row expressions.

Read more

The SWITCH() Function: Replacing Complex Nested IF-ELSE

Clean routing tables instead of nested IF statements.

Read more

SAMEPERIODLASTYEAR(): Year-over-Year (YoY) Comparisons

Shift dates exactly one year back for YoY metrics.

Read more

PARALLELPERIOD(): Advanced Custom Moving Time Windows

Shift by custom intervals across months, quarters, or years.

Read more

ALL, ALLEXCEPT and ALLSELECTED

Control how measures obey slicers and visual row filters.

Read more

Mastering DAX Ranking: Static vs. Dynamic Patterns

RANKX patterns for global, segmented, and interactive ranks.

Read more

New vs. Returning Customers DAX Pattern for E-commerce

Absolute, category-relative, and churn customer logic.

Read more

Tracking Customer Retention with Cohort Analysis (M0, M1, M2…)

Build retention matrices with cohort month distance.

Read more