ATTRS TM1 Function: How to Use and Syntax within TI and Rules

ATTRS stands for ATTRibute String, in other words it returns the contents of a string attribute from an element in a dimension in TM1.

Note this is not AttrGetS! That function does not exist!

Syntax of ATTRS

The syntax of ATTRS is:

ATTRS (dimension, element, attribute); 

where:

  • 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

Usage

Assume that the variable sPeriod contains “Jan” in a Period dimension with a string attribute called Period Long.

An example of the use is:

ATTRS ('Period', sPeriod, 'Period Long'); 

which will return the string of the long name for the period (in our case “January”) for the month “Jan” from the dimension “Period”. Pretty easy huh!

The ATTRS function can be used in both Rules and TI processes.

To retrieve the value of a numeric attribute, please use ATTRN.

You might also like