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

FunctionDescription
SUMAdds up all values in a column.
AVERAGEReturns the arithmetic mean of a column.
COUNTCounts rows where the column contains a number.
COUNTACounts rows where the column contains any non-blank value.
COUNTROWSCounts the rows in a table, regardless of column content.
DISTINCTCOUNTCounts the distinct values in a column.
MIN / MAXReturns 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

FunctionDescription
CALCULATEEvaluates an expression in a modified filter context — the most-used function in DAX.
FILTERReturns a table containing only rows that meet a condition.
ALL, ALLEXCEPT, ALLSELECTED & REMOVEFILTERSRemove or partially restore filters — the basis of percent-of-total and grand-total patterns.
KEEPFILTERSANDs a filter with an existing one on the same column instead of CALCULATE's default of replacing it.
CROSSFILTERChanges a relationship's cross-filter direction or disables it, for a single calculation.
EARLIERReaches 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

FunctionDescription
SUMXEvaluates an expression per row, then sums the results.
AVERAGEXEvaluates an expression per row, then averages the results.
COUNTX / COUNTAXEvaluates an expression per row, then counts non-blank results.
MAXX / MINXEvaluates an expression per row, then returns the largest or smallest result.
RANKXRanks 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

FunctionDescription
TOTALYTD / TOTALQTD / TOTALMTDRunning total from the start of the year, quarter, or month.
SAMEPERIODLASTYEARThe same date range, shifted back exactly one year.
DATEADDShifts a date range by a given number of years, quarters, months, or days — preserving the exact shape of the current selection.
PARALLELPERIODLike DATEADD, but always snaps the result out to the entire shifted period, regardless of the current selection's shape.
FIRSTDATE / LASTDATEThe earliest or latest date in the current filter context.
STARTOFMONTH / ENDOFMONTHThe first or last date of the month containing the current context.
STARTOFYEAR / ENDOFYEARThe 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

FunctionDescription
RELATEDPulls a single value across a relationship, from the "one" side.
RELATEDTABLEPulls every related row across a relationship, from the "one" side, as a table.
LOOKUPVALUERetrieves a value from another table by matching columns — works without an existing relationship.
USERELATIONSHIPActivates a specific inactive relationship for one calculation.

Table Functions

FunctionDescription
SUMMARIZEGroups a table by columns, optionally computing an aggregation per group.
ADDCOLUMNSAdds computed columns to a table, evaluated per row — keeps every original column too.
SELECTCOLUMNSReturns a table with only specific columns, optionally renamed — drops everything else entirely.
VALUESReturns the distinct values of a column — adds an extra blank row for unmatched fact rows if a relationship's referential integrity is violated.
DISTINCTReturns the distinct values of a column, without VALUES' referential-integrity blank row.
TOPNReturns the top (or bottom) N rows of a table by a given expression.
UNIONStacks two or more tables into one — matches columns by position, not by name.
EXCEPT / INTERSECTReturns rows in one table but not another, or rows common to both — same positional column matching as UNION.

Logical Functions

FunctionDescription
IFReturns one of two results based on whether a condition is true.
SWITCHEvaluates an expression against multiple possible values — a flatter alternative to nested IF.
AND / OR / NOTCombine or invert logical conditions. (&& and || work the same as AND/OR inline.)
IFERRORReturns a fallback value if an expression errors — doesn't catch or replace a BLANK() result.
SELECTEDVALUEReturns a column's value when exactly one value is selected, and a fallback otherwise.

Text Functions

FunctionDescription
CONCATENATEJoins two text values. (The & operator does the same thing, and is more common in practice.)
UPPER / LOWERConverts text to all uppercase or lowercase.
LEFT / RIGHT / MIDExtracts a substring from the start, end, or middle of a text value — MID counts positions from 1, unlike Power Query's Text.Middle.
TRIMRemoves leading and trailing spaces — and collapses internal double spaces too, unlike Power Query's Text.Trim.
LENReturns the number of characters in a text value.
FORMATConverts a number or date to text, using a specified format.

Date & Time Functions

FunctionDescription
DATEConstructs a date from year, month, and day values.
TODAY / NOWReturns the current date, or current date and time — frozen at refresh time in a calculated column, live in a measure.
YEAR / MONTH / DAYExtracts the year, month, or day from a date.
CALENDARGenerates a continuous table of dates between a start and end date.
CALENDARAUTOGenerates a continuous date table automatically, spanning every date column in the entire model — not just one table.
DATEDIFFReturns 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

FunctionDescription
ISBLANKReturns true if a value is blank — not the same as testing = 0, since BLANK() = 0 is also true.
ISERRORReturns true if an expression would produce an error.
HASONEVALUEReturns true if exactly one value is visible in the current filter context for a column.
DIVIDEDivides 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: