Add a Hierarchy to a Dimension
Add a hierarchy to your dimension to support drill-down and drill-up in BI clients.
Introduction to Hierarchies
You can create more than one hierarchy for a dimension, but they must all be of the same type (internal and external Parent-Child hierarchies can be mixed).
-
Multiple parents
-
Unassigned members
-
Cycle handling
Add a Parent-Child Hierarchy
Parent-child hierarchies are defined by specifying parent and child columns. The hierarchy is recursive, and can have any number of levels.
For example, a departmental hierarchy could be modeled with the Parent Department ID and Department ID columns.
-
Open your dimension and click to open the Hierarchies dialog.
-
Click and then select Parent-Child Hierarchy.
-
Complete the following properties as appropriate:
Property
Description
Business Name
Enter a descriptive name to help users identify the object. This name can be changed at any time.
Technical Name
Displays the name used in scripts and code, synchronized by default with the Business Name.
To override the default technical name, enter a new one in the field. Technical names can contain only alphanumeric characters and underscores.Parent Column / Child Column
Select the parent and child columns that represent the hierarchy. The child column must be a key column and the parent and child columns must have the same data type.
If your dimension has more than one key column, then you should click to add an additional line for each key column.
-
Click Close to close the dialog and return to your dimension.
Add a Level-Based Hierarchy
Level-based hierarchies are defined by specifying two or more level columns. The hierarchy is non-recursive and has a fixed number of levels.
For example, a time hierarchy could be modeled by specifying the Year, Quarter, Month, Week, and Day columns as levels.
-
Open your dimension and click to open the Hierarchies dialog.
-
Click and then select Level-Based Hierarchy.
-
Complete the following properties as appropriate:
Property
Description
Business Name
Enter a descriptive name to help users identify the object. This name can be changed at any time.
Technical Name
Displays the name used in scripts and code, synchronized by default with the Business Name.
To override the default technical name, enter a new one in the field. Technical names can contain only alphanumeric characters and underscores.Levels
Click to add a level and select the column containing values for the highest level of your hierarchy. Click again to add the next level down. Keep adding levels until you reach the lowest level of your hierarchy.
For example, in a Products dimension, you may add three levels containing the columns Product Line, Product Category, and Product.
-
Click Close to close the dialog and return to your dimension.
Add an External Hierarchy
External hierarchies are parent-child hierarchies defined in a separate entity, which is then associated with the dimension (see Create an External Hierarchy for Drill-Down).
-
Open your dimension and click to open the Hierarchies dialog.
-
Click and then select External Hierarchy to open the External Hierarchy dialog.
-
Select the external hierarchy and click OK to show the mapping editor.
-
Drag the key column of your dimension and drop it on the child column of the hierarchy to map them.
-
Click Add to add the external hierarchy and return to the Hierarchies dialog.
-
Click Close to close the dialog and return to your dimension.