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).

The following hierarchy features are not supported:
  • Multiple parents

  • Unassigned members

  • Cycle handling

You can, alternatively, create one or more hierarchies in a Hierarchy with Directory (see Create a Hierarchy with Directory).

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.

  1. Open your dimension and click (Hierarchies) to open the Hierarchies dialog.

  2. Click (Add)and then select Parent-Child Hierarchy.

  3. 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 (Add) to add an additional line for each key column.

  4. 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.

  1. Open your dimension and click (Hierarchies) to open the Hierarchies dialog.

  2. Click (Add)and then select Level-Based Hierarchy.

  3. 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 (Add) to add a level and select the column containing values for the highest level of your hierarchy. Click (Add) 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.

  4. 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).

  1. Open your dimension and click (Hierarchies) to open the Hierarchies dialog.

  2. Click (Add)and then select External Hierarchy to open the External Hierarchy dialog.

  3. Select the external hierarchy and click OK to show the mapping editor.

  4. Drag the key column of your dimension and drop it on the child column of the hierarchy to map them.

  5. Click Add to add the external hierarchy and return to the Hierarchies dialog.

  6. Click Close to close the dialog and return to your dimension.