Skip to main content
You can use the hierarchies parameter within cubes to define hierarchies. You can think about a hierarchy as a means to group dimensions together and organize them into levels of granularity, allowing users to drill down or roll up for analysis.
Hierarchies display is subject to support in visualization tools. Check APIs & Integrations for details. You can also preview hierarchies in Playground.
Any hierarchy should have the following parameters: name and levels.
Just like other members, hierarchies can be exposed to data consumers through views. List them in the includes parameter of a view’s cubes block alongside measures, dimensions, and segments.

Parameters

name

The name parameter serves as the identifier of a hierarchy. It must be unique among all members within a cube and follow the naming conventions.

title

You can use the title parameter to set the human-readable name of a hierarchy:

levels

The levels parameter is used to define the levels of the hierarchy. You can do so by listing the dimensions included in the hierarchy, from less granular to more granular ones:
You can include the same dimension in multiple hierarchies. It is also possible to include a dimension from a joined cube into a hierarchy:

public

The public parameter is used to manage the visibility of a hierarchy. Valid values for public are true and false. When set to false, this hierarchy cannot be queried through the API. Defaults to true.