Creating a Parent-Child Hierarchy

Use parent-child hierarchies to structure your data into parent-child relationships. When the data is displayed in a story, hierarchies can be expanded or collapsed.

Context

You can create a parent-child hierarchy during the data-preparation stage, or in the Modeler.

Procedure

To create a parent-child hierarchy in the data-preparation stage

Follow these steps to create a parent-child hierarchy during data preparation. Creating a hierarchy here, instead of in the Modeler, is faster and more automated, but to make adjustments, or to add or delete members from the hierarchy, you'll need to use the Modeler.

  1. Start creating a model.

    After the initial raw data import, you'll see the data integration view, where you perform data preparation before creating the model.

  2. Select the column that you want to be the child in the parent-child hierarchy.
    For example, if you're creating a geography hierarchy, with Country as the parent and City as the child, select the City column. Note that you can change the column name by double-clicking the column header.
  3. In the Details panel, select Add Dimension Attributes.
  4. Select Parent-Child Hierarchy (Parent).
  5. In the Select parent list, choose the column that you want to be the parent in the hierarchy.

    The column's icon changes to show that it's now the parent in the hierarchy.

  6. Repeat the above steps if you want to create more parent-child hierarchies.
    Note

    The parent and child columns don't need to represent levels in a hierarchy. For example, if you're setting up a hierarchy similar to a company org chart, the columns could contain data like this:

    Child Parent
    John Mary (John's manager)
    Pierre Mary (Pierre's manager)
    Mary Joanna (Mary's manager)
    Kevin Joanna (Kevin's manager)
    Otto Kevin (Otto's manager)

    If you do want to set up a level-based hierarchy though, see Creating a Level-Based Hierarchy.

    Note
    If a column is mapped to a hierarchy parent of a dimension, an empty cell in that column means that the corresponding dimension member doesn't have a parent in that hierarchy. In other words, that member is a top-level node of the hierarchy.

    For example, if you have the following columns, the resulting hierarchy will have A as the top-level node, with two child nodes A1 and A2:

    Product (child) Product group (parent)
    A1 A
    A2 A
    A  

    The dimension member A still belongs to the hierarchy. If you want a newly created dimension member to be excluded from a hierarchy of that dimension, don't map the hierarchy to a column.

  7. Select Create Model.
    In the Modeler, you now see the dimensions and attributes of your model, including the hierarchy you created. If you want to make any changes to the hierarchy, see the following steps.

To create a parent-child hierarchy in the Modeler

The steps below describe how to create a parent-child hierarchy in the Modeler, or to make adjustments, or to add or delete members from the hierarchy.

  1. Import data and create your model, or open an existing model.
  2. Switch to the Model view.
  3. Open a dimension.
  4. In the Dimension Settings panel, select Start of the navigation path Create Hierarchy Next navigation step Parent-Child HierarchyEnd of the navigation path.
    If other parent-child hierarchies already exist, select beside Hierarchies in the Dimension Settings panel.
  5. Type a name for the parent of the hierarchy, type a description (optional), and then select Done.
    The new hierarchy is added as a new column for the dimension.
  6. Switch to the grid view, and then type or paste data into the cells of the parent column.
    Note

    All nodes in a parent-child hierarchy also need to be valid dimension members. Therefore, any values that you add to the parent column must also exist in the Member ID column.

    In the following example, you need to add the Joanna row, where xyz is a unique identifier:

    Member ID Description Hierarchy Parent
    a123 John c345
    b234 Pierre c345
    c345 Mary xyz
    d456 Kevin xyz
    e567 Otto d456
    xyz Joanna  

    Note that if you create this hierarchy in the data-preparation stage, you don't need to include the Joanna row in your source data; the application creates it automatically.

  7. Select (Hierarchy Management) in the toolbar to open the Hierarchy Maintenance view.
    Here, you can drag members to correct any errors or to refine your hierarchy. The changes are reflected automatically in the grid.
  8. You can also make changes directly in the grid, such as adding or deleting members from the hierarchy.
    For example, if you want to add Fernando, whose manager is Kevin, type Fernando in the Description column, and then type a unique identifier in the ID column. In the Preview panel, drag Fernando under Kevin, or type d456 manually in the Parent column.