DAX Function Reference
A categorized reference of common DAX functions — aggregation, filter, iterator, time intelligence, and more — linking to full explanations where available.
DAX Function Reference
A quick-scan index of the DAX functions most commonly used in Power BI, grouped by category. Where a function has a full explanation elsewhere on this site — syntax, examples, common mistakes — the name links to it. Functions without a dedicated page get a one-line description here, since they're simple enough not to need one.
Aggregation Functions
| Function | Description |
|---|---|
SUM | Adds up all values in a column. |
AVERAGE | Returns the arithmetic mean of a column. |
COUNT | Counts rows where the column contains a number. |
COUNTA | Counts rows where the column contains any non-blank value. |
| COUNTROWS | Counts the rows in a table, regardless of column content. |
| DISTINCTCOUNT | Counts the distinct values in a column. |
MIN / MAX | Returns the smallest or largest value in a column. |
These accept a single column and evaluate it within the current filter context — no row-by-row iteration involved. See Measures for how they're typically wrapped into named calculations.
Filter & Context Functions
| Function | Description |
|---|---|
| CALCULATE | Evaluates an expression in a modified filter context — the most-used function in DAX. |
| FILTER | Returns a table containing only rows that meet a condition. |
| ALL, ALLEXCEPT, ALLSELECTED & REMOVEFILTERS | Remove or partially restore filters — the basis of percent-of-total and grand-total patterns. |
| KEEPFILTERS | ANDs a filter with an existing one on the same column instead of CALCULATE's default of replacing it. |
| CROSSFILTER | Changes a relationship's cross-filter direction or disables it, for a single calculation. |
| EARLIER | Reaches back to an outer row context from inside a nested one — mostly replaced by VAR in modern DAX. |
See Filter Context for how these functions interact with what's currently filtering a calculation.
Iterator (X) Functions
| Function | Description |
|---|---|
| SUMX | Evaluates an expression per row, then sums the results. |
AVERAGEX | Evaluates an expression per row, then averages the results. |
COUNTX / COUNTAX | Evaluates an expression per row, then counts non-blank results. |
MAXX / MINX | Evaluates an expression per row, then returns the largest or smallest result. |
| RANKX | Ranks a value against every other value produced by an expression across a table. |
All of these evaluate their expression once per row of the given table — see Iterators for how row-by-row evaluation actually works, and Performance Optimization for when iterators get expensive.
Time Intelligence Functions
| Function | Description |
|---|---|
TOTALYTD / TOTALQTD / TOTALMTD | Running total from the start of the year, quarter, or month. |
SAMEPERIODLASTYEAR | The same date range, shifted back exactly one year. |
| DATEADD | Shifts a date range by a given number of years, quarters, months, or days — preserving the exact shape of the current selection. |
| PARALLELPERIOD | Like DATEADD, but always snaps the result out to the entire shifted period, regardless of the current selection's shape. |
FIRSTDATE / LASTDATE | The earliest or latest date in the current filter context. |
STARTOFMONTH / ENDOFMONTH | The first or last date of the month containing the current context. |
STARTOFYEAR / ENDOFYEAR | The first or last date of the year containing the current context. |
See Time Intelligence for the full explanation, or the DAX Time Intelligence Cheat Sheet for a fast, scannable version of this same table with examples.
Relationship Functions
| Function | Description |
|---|---|
| RELATED | Pulls a single value across a relationship, from the "one" side. |
| RELATEDTABLE | Pulls every related row across a relationship, from the "one" side, as a table. |
| LOOKUPVALUE | Retrieves a value from another table by matching columns — works without an existing relationship. |
| USERELATIONSHIP | Activates a specific inactive relationship for one calculation. |
Table Functions
| Function | Description |
|---|---|
| SUMMARIZE | Groups a table by columns, optionally computing an aggregation per group. |
| ADDCOLUMNS | Adds computed columns to a table, evaluated per row — keeps every original column too. |
| SELECTCOLUMNS | Returns a table with only specific columns, optionally renamed — drops everything else entirely. |
| VALUES | Returns the distinct values of a column — adds an extra blank row for unmatched fact rows if a relationship's referential integrity is violated. |
| DISTINCT | Returns the distinct values of a column, without VALUES' referential-integrity blank row. |
| TOPN | Returns the top (or bottom) N rows of a table by a given expression. |
| UNION | Stacks two or more tables into one — matches columns by position, not by name. |
| EXCEPT / INTERSECT | Returns rows in one table but not another, or rows common to both — same positional column matching as UNION. |
Logical Functions
| Function | Description |
|---|---|
| IF | Returns one of two results based on whether a condition is true. |
| SWITCH | Evaluates an expression against multiple possible values — a flatter alternative to nested IF. |
AND / OR / NOT | Combine or invert logical conditions. (&& and || work the same as AND/OR inline.) |
| IFERROR | Returns a fallback value if an expression errors — doesn't catch or replace a BLANK() result. |
| SELECTEDVALUE | Returns a column's value when exactly one value is selected, and a fallback otherwise. |
Text Functions
| Function | Description |
|---|---|
CONCATENATE | Joins two text values. (The & operator does the same thing, and is more common in practice.) |
| UPPER / LOWER | Converts text to all uppercase or lowercase. |
| LEFT / RIGHT / MID | Extracts a substring from the start, end, or middle of a text value — MID counts positions from 1, unlike Power Query's Text.Middle. |
| TRIM | Removes leading and trailing spaces — and collapses internal double spaces too, unlike Power Query's Text.Trim. |
LEN | Returns the number of characters in a text value. |
FORMAT | Converts a number or date to text, using a specified format. |
Date & Time Functions
| Function | Description |
|---|---|
DATE | Constructs a date from year, month, and day values. |
| TODAY / NOW | Returns the current date, or current date and time — frozen at refresh time in a calculated column, live in a measure. |
YEAR / MONTH / DAY | Extracts the year, month, or day from a date. |
| CALENDAR | Generates a continuous table of dates between a start and end date. |
| CALENDARAUTO | Generates a continuous date table automatically, spanning every date column in the entire model — not just one table. |
| DATEDIFF | Returns the difference between two dates, in a specified unit — counts calendar boundaries crossed, not full elapsed periods. |
See Date Tables for how CALENDAR/CALENDARAUTO fit into building a proper date table.
Information Functions
| Function | Description |
|---|---|
| ISBLANK | Returns true if a value is blank — not the same as testing = 0, since BLANK() = 0 is also true. |
ISERROR | Returns true if an expression would produce an error. |
HASONEVALUE | Returns true if exactly one value is visible in the current filter context for a column. |
| DIVIDE | Divides two numbers, returning blank (or a specified fallback) instead of an error on division by zero. |
DIVIDE in particular should be the default over the / operator in report-facing measures — see Best Practices for where this comes up.
Beyond Built-In Functions
Every function above is built into DAX. As of the June 2026 release, DAX also supports user-defined functions — package a calculation once with the FUNCTION keyword, and reuse it across measures, calculated columns, and visual calculations like any built-in function. See DAX User-Defined Functions (UDFs) for the syntax and the val/expr distinction that controls how a UDF's parameters get evaluated.
How to Use This Reference
- Linked functions have a full page: syntax, worked examples, common mistakes, and best practices.
- Unlinked functions are simple enough that a one-line description is genuinely sufficient — Microsoft's own DAX function reference covers full parameter lists for anything not detailed here.
- Start with Introduction and Basics if any of this terminology (filter context, row context, iterator) isn't yet familiar — the function list assumes those concepts.
Next Steps
Continue learning DAX: