EXPAND DAX Function (Visual calculations)
Retrieves a context with added levels of detail compared to the current context. If an expression is provided, returns its value in the new context, allowing for navigation in hierarchies and calculation at a more detailed level.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| Expression | Optional |
The expression to be evaluated in the new context. |
| Axis | Optional |
An axis reference. |
| Column | Optional Repeatable |
A column in the data grid. |
| N | Optional |
The number of levels to expand. If omitted, the default value is 1. |
Notes
The visual calculation functions have an axis parameter that is defined in the VISUAL SHAPE query syntax produced by the visual calculation feature in Power BI.
Related articles
Learn more about EXPAND in the following articles:
-
Introducing VISUAL SHAPE for visual calculations in Power BI
This article introduces the VISUAL SHAPE clause, which defines a hierarchical structure for a table used in visual calculations. » Read more
-
Introducing EXPAND and COLLAPSE for visual calculations in Power BI
This article introduces the two basic visual context navigation functions: EXPAND and COLLAPSE. » Read more
-
Using EXPAND and COLLAPSE in visual calculations
This article provides examples of visual calculations where the use of EXPAND and COLLAPSE is required to obtain the correct result. » Read more
-
SQLBI+ updates in April 2026
We released a new session in SQLBI+: How to navigate the lattice of visual calculations: This video explains how to navigate the lattice of visual calculations in DAX, using COLLAPSEALL and EXPAND to move between levels. A key topic is the difference between ROWS/COLUMNS and VALUES of ROWS/COLUMNS. The video also shows how to create reusable visual calculation functions that encapsulate lattice navigation logic, simplifying otherwise complex code. Stay tuned for new SQLBI+ content coming in 2026! » Read more
-
Using visual calculations to highlight an entire row
Visual calculations can be used efficiently to format visuals. This article presents an interesting technique to highlight a row based solely on the maximum value in the last column. » Read more
Last update: Apr 29, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/expand-function-dax