ATTRS stands for ATTRibute String, in other words it returns the contents of a string attribute from an element in a dimension in TM1.
Syntax of ATTRS
The syntax is:
ATTRS (dimension, element, attribute);
- dimension is the dimension you want to interrogate
- element is the element you want to find the attribute for
- attribute is the name of the attribute you want to get the result of
Assume that the variable sPeriod contains “Jan”.
An example of the use is:
ATTRS ('Period', sPeriod, 'Period No');
which will return the string value for the period number (in our case “01”) for the month “Jan” from the dimension “Period”. Pretty easy huh!
This function can be used in both Rules and TI processes.
To retrieve the value of a numeric attribute, please use ATTRN.