Adding a hierarchy

Note

  • You cannot use hierarchies in Map, Indicator, and Pivot table charts.
  • You can only add one hierarchy to a chart.

To add a hierarchy:

  1. Go to the workbook and select the chart.

  2. On the left side of the screen above the list of dimensions and measures, click and select Hierarchy.

    screenshot

  3. Enter the hierarchy name, select dimensions, and arrange them as you see fit.

    screenshot

  4. In the bottom-right corner, click Save.

  5. Drag the created hierarchy to any available section. For example, for the Table chart type, you can use the Columns section.

  6. Drag other dimensions and measures to the appropriate sections.

  7. In the top-right corner, click Save.

Example of adding a hierarchy

We will use a Moscow retail chain's demo ClickHouse® sales database as our data source. For an example of creating a connection and dataset, see this guide.

  1. In the top-right corner of the dataset, click Create chart.

  2. Select the Donut chart visualization type.

  3. Add a sales measure to the chart. To do this, drag the Sales field from Measures to the Measures section.

  4. On the left side of the screen above the list of dataset fields, click and select Hierarchy.

  5. Enter Products as the hierarchy name and select the dimensions in the following sequence: ProductCategory, ProductSubcategory, ProductBrand, and ProductName.

  6. In the bottom-right corner, click Save.

  7. Drag the created hierarchy to the Color section.

  8. Save the chart:

    1. In the top-right corner, click Save.
    2. In the window that opens, enter Donut chart with hierarchy as the chart name and click Save.

Adding a hierarchy to the chart will allow you to switch between levels of detail: ProductCategoryProductSubcategoryProductBrandProductName.

You can see some examples of charts with a hierarchy on a ready-made dashboad.

See also

ClickHouse® is a registered trademark of ClickHouse, Inc.