Exploring TM1 - a Chartertech Company
Close this search box.

DimensionSortOrder TM1 Function: Use and Syntax

DimensionSortOrder is used to sort a dimension from within a Turbo Integrator (TI) process.

Syntax of DimensionSortOrder

The syntax is:

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


  • DimName, is the dimension to be sorted.
  • CompSortType, sets the order for Consolidated elements.
    • ByInput (the order used is the order the elements were added to the dimension) or
    • ByName (the order used is alphabetic on the field chosen).
  • CompSortSense, Ascending or Descending
  • ElSortType, sets the order for N level elements.
    • ByInput (the order used is the order the elements were added to the dimension),
    • ByName (the order used is alphabetic on the field chosen),
    • ByLevel (sorts the elements by level), or
    • ByHierarchy (sorts the elements by hierarchy).
  • ElSortSenseAscending or Descending either alphabetically or by level

Note: this function must be placed in the Prolog of a TI, not the Data, Metadata or Elipog tabs!

Use of DimensionSortOrder

DimensionSortOrder will normally be used to re-sort a dimension’s default order after an element has been added using DimensionElementInsert.

Why is this useful? Often we end up with many elements in a dimension and they appear to the user in an unsorted mess. this forces the dimension to be sorted in a manner that is useful to the end user.  It is especially handy when you have a long dimension with a single consolidation element.

Example of Use

DimensionSortOrder ( cDim, 'ByName', 'Ascending' , 'ByName' , 'Ascending' );

where cDim has already been defined as the dimension we are working with in the TI. This will sort both consolidation and N level elements in this case ascending by name.

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Log In