DAX Functions Reference
This document provides a comprehensive reference for Data Analysis Expressions (DAX) functions used in SQL Server Analysis Services (SSAS), Power BI, and Power Pivot in Excel.
Introduction to DAX Functions
DAX is a formula expression language used for creating custom calculations in Analysis Services, Power BI, and Power Pivot. It includes a library of over 200 functions that perform various operations, from simple aggregation to complex time-intelligence calculations.
DAX functions are categorized by their functionality to help you find the right function for your needs. Common categories include:
Aggregation Functions
Summarize data, like SUM, AVERAGE, MIN, MAX, COUNT.
Date and Time Functions
Manipulate date and time values, like DATE, YEAR, MONTH, TODAY.
Filter Functions
Modify the filter context of expressions, like FILTER, ALL, RELATED.
Financial Functions
Perform financial calculations, like FV, PV, NPV.
Information Functions
Return information about data types or values, like ISBLANK, ISERROR.
Logical Functions
Perform logical operations, like IF, AND, OR, NOT.
Mathematical and Trigonometric Functions
Perform mathematical operations, like ROUND, SQRT, SIN.
Model Relationships Functions
Navigate relationships between tables, like RELATEDTABLE, USERELATIONSHIP.
Parent and Child Functions
Work with hierarchical data, like PATH, PATHITEM.
Statistical Functions
Perform statistical calculations, like MEDIAN, MODE.
Text Functions
Manipulate text strings, like CONCATENATE, LEFT, FIND.
Time Intelligence Functions
Perform time-based calculations, like TOTALYTD, DATEADD, SAMEPERIODLASTYEAR.
Table Manipulation Functions
Create or modify tables, like ADDCOLUMNS, SUMMARIZECOLUMNS.
Common DAX Functions
Here are a few examples of frequently used DAX functions:
SUM()
Returns the sum of all numbers in a column.
SUM([column])
AVERAGE()
Returns the average of all numbers in a column.
AVERAGE([column])
CALCULATE()
Evaluates an expression in a modified filter context. This is one of the most powerful and frequently used functions in DAX.
CALCULATE(, , , ...)
FILTER()
Returns a table that has been filtered. It is often used within CALCULATE.
FILTER(, )
TOTALYTD()
Returns a year-to-date total for the current context in the specified column, based on the dates in the specified dates column.
TOTALYTD(, [, ][, ][, ])
Learning More
For detailed syntax, parameter descriptions, return values, and examples for each DAX function, please refer to the official DAX Function Reference.
You can explore the full list and specific function details through the navigation pane on the left, or by searching for a specific function.