Creating new dimension hierarchies

You may find it useful to define a hierarchy of dimensions, to enable visuals with variable levels of granularity over the same range of data.

The following steps demonstrate how to define such a hierarchy on the dataset World Life Expectancy [data source samples.world_life_expectancy]. In this example the dimensions un_region, un_subregion, and country are used to define a dimensional hierarchy called Region.

  1. On the main navigation bar, click DATA.

    The Data view appears open on the Datasets tab.

  2. In the left navigation menu, click samples.
  3. In the Datasets area, select World Life Expectancy (samples.world_life_expectancy).
  4. In the Dataset Detail menu, select Fields.
  5. In the Fields interface, select Edit fields.
  6. In the editable Fields interface, under Dimensions, find the field un_region.
  7. Click Down icon on the un_region line, and select Create Hierarchy.
  8. In the Create Hierarchy modal window, enter the values for Hierarchy Name and Hierarchy Comment, and click CREATE.

    The example shows a hierarchy named Region, described as Geographical Granularity.

  9. Note that Measures now contain a hierarchy Region, denoted by the Hierarchy icon. The hierarchy contains a single element, un_region.
  10. To add more levels to the hierarchy, simply click and drag the relevant dimensions or measures to the newly created hierarchy. Make sure to arrange them in order of scale, from largest to smallest.

    Below un_region, un_subregion was added.

    Below un_subregion, country was added.

  11. Click SAVE.

Defined dimension hierarchies, such as Region created here, can be used just as any other dimension field of the dataset.