- ATTRN
- ATTRS
- ConsolidateChildren
- DIMNM
- DIMSIZ
- DNEXT
- DNLEV
- TABDIM
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
ATTRN returns a numeric attribute for a specified element of a dimension.
Syntax:
ATTRN(dimension, element, attribute)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
| element | An element of the dimension. |
| attribute | The attribute for which you want to retrieve a value. This argument must be a valid attribute of the element. |
Example:
ATTRN('Model', 'L Series 1.8L Sedan', 'Manufacture Code')
In this example, the function returns the numeric value of the Manufacture Code attribute of the L Series 1.8L Sedan element in the Model dimension.
ATTRS:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
ATTRS returns a string attribute for a specified element of a dimension.
Syntax:
ATTRS(dimension, element, attribute)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
| element | An element of the dimension. |
| attribute | The attribute for which you want to retrieve a value. This argument must be a valid attribute of the element. |
Example:
ATTRS('Model', 'L Series 1.8L Sedan', 'Manufacture Code')
In this example, the function returns the string value of the Manufacture Code attribute of the L Series 1.8L Sedan element in the Model dimension.
ConsolidateChildren:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
This function forces consolidated values to be calculated by summing immediate children along a specified dimension. This is useful when intermediate consolidations are calculated by rules and you want a parent consolidation to be calculated by summing the intermediate consolidations rather than by summing the underlying leaf values.
Syntax:
ConsolidateChildren(DimName1, DimName2, ...)
Arguments:
| Argument | Description |
| DimName1, DimName2, ... | Names of the dimensions along which consolidations will be performed. The function requires at least one DimName argument, and can accept as many DimName arguments as there are dimensions in the cube for which the rule is written. |
Consider a cube named Sales composed of the dimensions ActVsBud, Region, Model, Account1, and Month.
In this example, the Month dimension is defined as follows:
The following figure illustrates this consolidation.
[{'1 Quarter', '2 Quarter', '3 Quarter', '4 Quarter'}]=1;
The result is as follows:
['Year']=ConsolidateChildren('Month');[{'1 Quarter', '2 Quarter', '3 Quarter', '4 Quarter'}]=1;
In the rule, the statement ['Year']=ConsolidateChildren('Month') says that the Year consolidation should be calculated by summing the immediate children of Year in the Month dimension.
The following figure shows the result of the ['Year']=ConsolidateChildren('Month') statement:
It's important to remember that for a given consolidation, the ConsolidateChildren function applies only to the immediate children of the consolidation.
The ConsolidateChildren function can also be used to specify how consolidations are calculated in multiple dimensions, as in the following example:
Arguments:
| Argument | Description |
| ['World','Year']= ConsolidateChildren(' Region','Month') | This statement applies the ConsolidateChildren function to both the World and Year consolidations. In this case, World is calculated by summing all its immediate children in the Region dimension, while Year is calculated by summing its immediate children in the Month dimension. |
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes. DIMNM returns the element of a dimension that corresponds to the index argument.
Syntax:
DIMNM(dimension, index)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
| index | A value less than or equal to the number of
elements in the dimension. If this argument is less than 1, or greater than the number of elements in the dimension, the function returns 0. |
Example:
DIMNM('Region',2)
This example returns 'Belgium', which is the element within the Region dimension with an index value of 2.
DIMSIZ:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
DIMSIZ returns the number of elements within a specified dimension.
Syntax:
DIMSIZ(dimension)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
Example:
DIMSIZ('Accounts')
If the dimension Accounts contains 19 elements, the example returns the value 19.
DNEXT:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes. DNEXT returns the element name that follows the element specified as an argument to the function.
Syntax:
DNEXT(dimension, element)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
| element | The name of an element within the dimension. This argument can also be the name of an alias for a dimension element. |
Example:
DNEXT("Location","Oregon")
If the Location dimension contains the ordered elements California, Oregon, and Washington, the example returns Washington.
DNLEV:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
DNLEV returns the number levels in a dimension.
Syntax:
DNLEV(dimension)
Arguments:
| Argument | Description |
| dimension | A valid dimension name. |
Example:
DNLEV('Region')
In the Region dimension, the various countries (Level 0) add up to regions (Level 1). The regions then add up to super-regions (Level 2), which in turn add up to the world (Level 3).
TABDIM:
This is a TM1 rules function, valid in both TM1 rules and TurboIntegrator processes.
TABDIM returns the dimension name that corresponds to the index argument.
Syntax:
TABDIM(cube, index)
Arguments:
| Argument | Description |
| cube | A valid cube name. |
| index | A positive value less than or equal to the total number of dimensions in the cube. |
Example:
TABDIM('SalesCube',3)
The cube SalesCube contains five dimensions: account1, actvsbud, model, month, and region. The example returns model, the third dimension of SalesCube.
0 comments:
Post a Comment