Aug 21 2018

The (increased) importance of attributes in Planning Analytics

The importance of attributes in PA Attributes have always been very useful when developing a TM1 model but until now have never been an essential component of development. With Planning Analytics this changes. This is a forgotten or little known point that all TM1 developers should be aware of and is relevant for anyone with […]

The importance of attributes in PA

Attributes have always been very useful when developing a TM1 model but until now have never been an essential component of development. With Planning Analytics this changes. This is a forgotten or little known point that all TM1 developers should be aware of and is relevant for anyone with an existing TM1 model considering upgrading to Planning Analytics, especially if Workspace (or any other Rest API based front end) will be used to access the TM1 model.

Why is this?

“Old school” TM1 UIs based on the C API has never particularly cared if a dimension has attributes or not, the existence of attributes just added potential functionality. However, in the newer Rest API the ExecuteMDXSetExpression function wasn’t introduced until version 2.03 (TM1 server version 11.1.0). Until this point, there was no MDX member set query and data queries were used as a workaround for the dual purpose of returning member sets as well as cell sets. Without the existence of an }ElementAttributes cube, there is no associated cell set data and therefore the query will fail.

You may have noticed that the subset editor in Workspace doesn’t work for some dimensions. This is why! (Some Rest based UIs such as Arc will give you a warning if you try to open a dimension that doesn’t have any attributes.) Therefore if you want to use a dimension on the row or column axes or be able to use the subset editor in any Rest-based UI you need to make sure the dimension contains attributes. This can be a “chicken and egg” type problem where we are designing a model and creating dimensions in a Rest-based UI but is easily overcome by making sure we create an attribute up-front when creating a dimension from scratch.

Should we have a default attribute?

The best candidate for a “default attribute” which should exist in almost any dimension in Planning Analytics is the Caption attribute. Any attribute called “Caption” will automatically be linked to the intrinsic MDX MEMBER_CAPTION property. The Caption attribute in TM1 can be typed as either Text or Alias and has some special properties as the caption will be used as the element display name in all modern Rest UIs (also TM1 Web). This can be very useful to simplify the display of a model for end-users, especially to convey a single name to users where several dimensions may have different technical names (which is of no relevance to the end-user.) If desired the Caption attribute can also be made Locale sensitive to automatically display a different value based on the language settings of the user’s browser.

This is just one issue to consider when upgrading to Planning Analytics, for a complete list of things to think through don’t forget our recent article on what to consider when upgrading to Planning Analytics.

Related content

Loading related content