Order by Label

Returns a list or elements with labels sorted in alphabetical or reverse-alphabetical order.

Syntax & Usage

Order([List], desc OR asc)
  • Create the required list and add the Order by Label block to it.
  • From the Order by Label block's Sort Options window, select the required sort order (ascending for alphabetical or descending for reverse-alphabetical).

Example

In this example, the Product hierarchy is sorted in reverse-alphabetical order:

{Order({AllMembers([products].[Product])},desc)}

When added to a query, the set's members are listed in reverse-alphabetical order: