A hierarchy is used to establish parent-child relationships within your data. For example, suppose you have sales data for the following:
- Worldwide
- Region
- Country
- State/Province
- City
A hierarchy allows you to organize these geographic areas into logical levels (also called nodes), from the largest area to the most granular.
The hierarchy column in a dimension is used to store the parent-child values. You can add hierarchies by selecting +Add Hierarchy on the toolbar. When you choose this option, a new hierarchy column is inserted into the dimension, and you must enter the name of the new hierarchy.
The hierarchy is visualized in the Preview panel in the dimension. You can use drag-and-drop in the Preview panel to arrange the members and build the relationships. If more than one hierarchy has been defined, you can select the one you want to display in the preview from the drop-down list.
General Information About Hierarchies
Dimension types that allow more than one hierarchy can have either one or more level-based hierarchies or one or more parent-child hierarchies, but not a combination of both.
In an account-based model, the Account dimension type has only one system-generated parent-child hierarchy, but in a measure-based model, multiple account hierarchies are allowed.
For the Date dimension type, hierarchies are predefined based on the model granularity, and whether you have enabled fiscal time for the model. You can specify a default hierarchy in the settings for the date dimension. In a measure-based model, additional custom hierarchies may be added. We will cover custom time hierarchies in more detail later in the course.
The Version dimension type does not have a hierarchy, because different versions are independent from one another and do not have parent-child relationships.