RANGE DAX Function (Visual calculations)
Retrieves a range of rows within the specified axis, relative to the current row.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| Step |
The desired length of the window. If negative, the window will contain the last -STEP rows before the current row. Otherwise, the window will contain the first STEP rows after the current row. |
|
| IncludeCurrent | Optional |
A logical value specifying whether or not to include the current row. Default value is TRUE. |
| Axis | Optional |
An axis reference. |
| OrderBy | Optional |
Columns that define how each partition is sorted. |
| Blanks | Optional |
An enumeration that defines how BLANK values are ordered. Valid values are: DEFAULT, LAST, FIRST. |
| Reset | Optional |
Specifies how the calculation restarts. Valid values are: None, LowestParent, HighestParent, or an integer. |
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 RANGE in the following articles:
-
Using REMOVEFILTERS in DAX user-defined functions
In this article, we implement a function that removes filter-keep column filters from a calendar, using REMOVEFILTERS as the return value of the function. » Read more
Last update: Jun 23, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/range-function-dax