New Upload weather data from web services into TM1/Planning Analytics — Read the post →

Mastering hierarchies in IBM Planning Analytics (TM1)

With IBM TM1 10.2.2 end of support, now is an ideal time to consider upgrading to IBM Planning Analytics. Before upgrading, an important consideration is whether or not to incorporate Planning Analytics' new Hierarchy feature into your applications.

Hierarchies vs Roll-ups

Until the arrival of Planning Analytics, what was commonly called a "hierarchy" in TM1 was simply a specific roll-up of C and N level elements in a dimension.

Cube Architecture with Hierarchies

TM1's basic cube structure has not changed since TM1's invention in 1984. Planning Analytics has introduced "real" hierarchies to TM1. Instead of a straight path from a dimension to its elements, there is now the option of inserting an intermediate level called a "Hierarchy".

By default, the new Hierarchy feature is not turned on — it must be enabled by adding EnableNewHierarchyCreation=T in the tm1s.cfg file.

Greater flexibility

Hierarchies behave like "virtual dimensions", enabling you to overcome one of the legacy limitations of TM1 — the need to rebuild cubes to accommodate new analysis dimensions. Adding a Hierarchy does not require recreating a cube, nor the modification of existing load processes or reports.

Greater performance

A major performance benefit is that you can reduce the number of dimensions in an analysis cube, and fewer dimensions increases query performance. For every dimension that is removed, at minimum one level is removed from the cube index, resulting in fewer "passes" to retrieve a cell value.

Hierarchies with Dimensions

Dimensions will still exist but they are not used in the cube — they are only used for establishing the dimension order. After creating your first Hierarchy, the "Leaves" Hierarchy will be automatically added.

Hierarchies with Leaf Elements

Each Hierarchy can have its own leaf elements. When you delete a leaf element from a Hierarchy, the element is not deleted from other hierarchies or the Leaves Hierarchy — data is still stored for this element. If you want to delete a leaf element and its cube data, you must delete it from the Leaves Hierarchy.

Hierarchies with Processes

To work with Hierarchies in TurboIntegrator, Planning Analytics introduced new TI functions that mirror existing dimension functions. For example, HierarchyExists instead of DimensionExists.

Hierarchies with Rules

Working with Hierarchies makes cube rules a bit more complex. To reference an element in a Hierarchy, use the syntax: DimensionName:HierarchyName:ElementName

If you omit the Hierarchy name, the "default" Hierarchy is used (same name as the dimension).

Hierarchies with Attributes

Hierarchies are stored as separate .dim files within the dimension's }hiers folder. Although you can store attribute values for the same named element on different hierarchies, everything is stored in a single }ElementAttributes_ cube.

Attr functions still work — you just need to use DimensionName:HierarchyName for the dimension name. IBM has also introduced new functions starting with "ElementAttr":

  • AttrS → ElementAttrS

  • AttrPutS → ElementAttrPutS

  • AttrInsert → ElementAttrInsert

Hierarchies with Subsets

With hierarchies, Subsets are attached to a Hierarchy, not a dimension. If you do not specify a Hierarchy when creating a subset, it will be added to all existing Hierarchies.

Hierarchies with Picklists

The syntax must be "hierarchy-qualified": instead of SUBSET:Dimname:Subname you must specify SUBSET:Dimname:Hierarchy:Subname.

Hierarchies with MDX

To reference an element in a Hierarchy in MDX, specify the Hierarchy name: instead of [Time].[2018] use [Time].[Time].[2018].

Named levels and default members

For dimensions not referenced in a cube view, TM1 will use the dimension's default member. Define default members in the }HierarchyProperties cube.

Hierarchies with Reporting

The DBR function in Active Forms does not support hierarchies. Alternatives include Cognos Analytics (read-only), Cubewise Canvas (read and write), or Slice for building Active Forms with hierarchies.

Should I implement hierarchies?

By using Hierarchies, you will gain in performance and flexibility, but you possibly lose some Excel reporting capabilities if you are a heavy user of Active Forms. If you can reproduce your Active Forms with PAX's Exploration Mode or do not need Excel-based reports, then it is a definite "yes" to implement Hierarchies.

Re-architecting your applications to take advantage of the new Hierarchy capability will require some time and effort, but it is an investment that will pay off in the long run, as your solutions will become nearly "future-proof" in accommodating evolving business requirements.