ORDERBY DAX Function (Filter)
The expressions and order directions used to determine the sort order within each partition. Can only be used within a Window function.
Syntax
Parameter | Attributes | Description |
---|---|---|
OrderBy_Expression | Optional Repeatable |
An expression used to determine the sort order. |
OrderBy_Direction | Optional Repeatable |
A value that specifies how to sort OrderBy_ColumnName values, ascending or descending:
|
Return values
This function does not return a value.
Remarks
This function can only be used within a window function expression (INDEX, OFFSET, WINDOW).
Related articles
Learn more about ORDERBY in the following articles:
-
Introducing window functions in DAX
In December 2022, DAX was enriched with window functions: INDEX, OFFSET, and WINDOW. This article introduces the syntax and the basic functionalities of these new features. » Read more
Related functions
Other related functions are:
Last update: Jun 10, 2023 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/orderby-function-dax