DimensionSortOrder

DimensionSortOrder sets a sort type and sense for dimension elements and for components of consolidated elements within a dimension. The sort order defined by DimensionSortOrder determines how the subset displays in the Subset Editor.

DimensionSortOrder sets properties for a dimension; the dimension is not actually sorted until it is saved on the server.

This function is valid in TM1® TurboIntegrator processes only.

Syntax

DimensionSortOrder(DimName, CompSortType, CompSortSense, ElSortType , ElSortSense);

Argument

Description

DimName

The name of the dimension for which you want to set a sort order.

CompSortType

Defines how components of consolidated elements appear in the dimension. There are two CompSortType values:

ByInput - Retains the order in which components were originally inserted into consolidations.

ByName - Sorts components of consolidations by name.

CompSortSense

Defines the sort sense for components of consolidations. This is a required argument, but it applies only when the CompSortType is ByName. There are two possible CompSortSense values:

Ascending - Sorts components of consolidations in ascending alphabetical order.

Descending - Sorts components of consolidations in descending alphabetical order.

ElSortType

Defines a sort order for dimension elements. There are four possible ElSortType values:

ByInput - Retains the order in which elements were originally inserted into the dimension.

ByName - Sorts dimension elements by name.

ByLevel - Sorts dimension elements by level.

ByHierarchy - Sorts dimension elements by hierarchy.

ElSortSense

Defines the sort sense for dimension elements. This is a required argument, but it applies only when the ElSortType is ByName or ByLevel. There are two possible ElSortSense values:

Ascending - Sorts dimension elements in ascending order, either alphabetically or by level.

Descending - Sorts dimension elements in descending order, either alphabetically or by level.

Example

DimensionSortOrder ('Region', 'ByName', 'Descending','ByLevel', 'Ascending'); 

This example sets a sort order for the Region dimension. All dimension elements are sorted by level in ascending order, and any components of consolidations are sorted in descending alphabetical order.