CreateHierarchyByAttribute

CreateHierarchyByAttribute creates a simple 3-level hierarchy from a single attribute.

The new hierarchy consists of a single high-level root element, a middle-level of consolidations representing existing attribute values, and a lower-level of dimension leaves that include the associated attribute value.

This function is valid in processes only.

This function is not available in processes on Planning Analytics Engine.

Note: This function creates a hierarchy from the current set of attribute values, but the system does not automatically keep the hierarchy in-sync with the attribute data as it changes. Modelers must regenerate the hierarchy as needed.

Syntax

CreateHierarchyByAttribute(DimName, AttrName [, emptyParent [, rootName ] ] );

Argument

Description

DimName

The name of the dimension that contains the attribute. A hierarchy of the same name as the dimension will be created.

AttrName

The name of the attribute to create the hierarchy from.

emptyParent

Specifies the name of a consolidation to create, which collects dimension leaves that don't have an attribute value. If passed as an empty string, the function does not create a consolidation.

rootName

Overrides the root element name which by default is named after the attribute.

Example

CreateHierarchyByAttribute ('Country', 'City');

This example creates a hierarchy from the City attribute in the Country dimension.