Hierarchies#
A hierarchy chains dimensions in levels: Zone › Province › Municipality, Family › Subfamily. Users see it as a tree in the segmentation editor (they choose a whole zone or only some provinces) and go down from one level to another in cubes and charts. In the metadata, each level is a dimension of type Hierarchy of the same fact table, with its auxiliary table and its upper level.
Before you start#
- You need Metadata administration.
- Each level needs its auxiliary table, with the codes and descriptions of that level (see Auxiliary tables).
- The fact table has to have the columns of all the levels.
Cumulative keys#
The rule of a hierarchy is that the columns of each level begin with those of its upper level. This way, the code of a level also identifies its parent, even if codes repeat under different parents (province 01 of two zones, subfamily 10 of two families).
The demonstration's example, with the CLIENTES fact table and three auxiliary tables:
| Level | Auxiliary table | Dimension columns | Join with the auxiliary table | Description |
|---|---|---|---|---|
| Zona (zone) | AUX_ZONAS |
COD_ZONA |
COD_ZONA |
DESC_ZONA |
| Provincia (province) | AUX_PROVINCIAS |
COD_ZONA, COD_PROVINCIA |
COD_ZONA, COD_PROVINCIA |
DESC_PROVINCIA |
| Municipio (municipality) | AUX_MUNICIPIOS |
COD_ZONA, COD_PROVINCIA, COD_MUNICIPIO |
COD_ZONA, COD_PROVINCIA, COD_MUNICIPIO |
DESC_MUNICIPIO |
If the fact table only has the code of the lowest level (for example, only the municipality), add to the fact table the columns of the upper levels (with a database view, if needed) so that each level has its own.
Build a hierarchy#
- Create or adjust one dimension per level in the same fact table, all of type Hierarchy (see Dimensions).
- In each one, in Columns and function, set the level's columns in order: first those of the upper level, then its own.
- In Lookup, choose its auxiliary table and pair each column with that of the auxiliary table in Join with “…”. Choose the Description column and the Order of the values.
- If the auxiliary table has more columns than those forming the level, check in Hierarchy columns those that form it. With none checked, they are those of the join.
- Save each dimension with Save changes.
- Chain the levels: in the second-level dimension, in the Hierarchy section, choose its Upper level; in the third one, the second. Save.
They are also chained in the Structure tree: drag a dimension onto the one that will be its upper level. The tree confirms it: ““Municipio” is now a level of “Provincia”.” If the dimension has unsaved changes in its panel, save or discard them before dropping it.
The Hierarchy section of the panel shows the whole chain and, if it has them, its Lower levels.


What Upper level offers#
Upper level only offers dimensions of type Hierarchy of the same table whose columns are the beginning of its own. If it offers none, the panel says so: “No hierarchy of “Clientes” has columns that are the beginning of its own: this dimension is the first level.” Then review the order of the columns.
A level can have several lower levels: for example, the customer's province and the delivery province under the same zone. Each level is queried with its own columns, so two lower levels never disagree with their parent.
How users see it#
- In the presentation tree the first level is placed: the others are seen inside it and move with it. A lower level is not placed separately (see Presentation tree).
- In the segmentation editor, the hierarchy is a tree of checkboxes: choosing a zone chooses all its provinces; you can choose only a part.
- In a cube, the hierarchy expands from one level to the next.
Hierarchies whose auxiliary table is a fact table#
If the auxiliary table of a level is also a fact table, the Filter on the fact table checkbox of its Lookup section makes it be read from that table when the query does not reach its own. See Dimensions.
Ranges#
In Empowerment Center 7 a field of a cube could be grouped by the range filters of its segmentation (the “range level”). In ECenter 8.0 that is done with a grouping by ranges: a derived dimension with buckets such as “Up to €1,000”, “From €1,000 to €3,000” and “Other”, which is created in Groupings and used like any dimension, also above its dimension as if it were an upper level. The EC7 importer translates the range level into a grouping by ranges when its filters are intervals that do not overlap. See Groupings.