Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Calculated column
Calculated table
Measure
Visual calculation
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.
The syntaxes that perform both navigation and calculation.
EXPAND ( <expression>, <axis>[, N] )
EXPAND ( <expression>, <column>[, <column>] ... )
The syntaxes that perform navigation only.
EXPAND ( <axis>[, N] )
EXPAND ( <column>[, <column>] ... )
Term | Definition |
---|---|
expression |
The expression to be evaluated in the new context. |
axis |
An axis reference. |
column |
A column in the data grid. |
N |
(Optional) The number of levels to expand. If omitted, the default value is 1. |
For versions that perform both navigation and calculation, the function returns the value of the expression in the new context after navigating to a new level. For versions that perform navigation only, the function modifies the evaluation context by navigating to a new level.
Given a table that summarizes the total sales for a hierarchy with levels for total, year, quarter and month, the following DAX calculations calculate the maximum value of [SalesAmount] at the child level, the grandchildren level, and the month level, respectively.
MaxOfChildren = EXPAND(MAX([SalesAmount]), ROWS)
MaxOfGrandChildren = EXPAND(MAX([SalesAmount]), ROWS, 2)
MaxOfMonthChildren = EXPAND(MAX([SalesAmount]), [Month])
The screenshot below shows the matrix with the three visual calculations.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!