# Hierarchies in tables

## 1. Hierarchical axis data

If your reports use hierarchical dimensions as Axis parameters,  Analytics+ allows you to **expand and collapse the hierarchy** and traverse the hierarchy with **drill-down and roll-up**. With these features, you can focus on specific levels of the hierarchy by expanding only those levels. Let's add a date hierarchy to the axis to see this action.

### 1.1. Drill down and rollup

When you add a hierarchy to the axis parameter, Analytics+ renders the data rolled up to the highest level of the hierarchy i.e. the root level.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FQwHoId2A0qNgNHTcp8Fd%2Fimage.png?alt=media&#x26;token=293dec9d-47f7-4a66-b58f-76d4aed307db" alt=""><figcaption><p>Adding hierarchies to the axis parameter</p></figcaption></figure>

**Drill down:** Click the <img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FRFgFhafdN6fPria0OBMR%2Fimage.png?alt=media&#x26;token=60edd59c-d90c-441c-ae80-53ca223af3ac" alt="" data-size="line"> icon to drill down to the next level. you can traverse the hierarchy to the lowermost level using this icon. &#x20;

**Root level: year**

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FKTGDZVqMFvuzQc9N39HI%2Fimage.png?alt=media&#x26;token=f4116b59-e3df-4358-9d36-214cdacee8b1" alt=""><figcaption><p>Highest level of the hierarchy</p></figcaption></figure>

After drilling down one level to quarter:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F3KKLnybzhuyj3RALFR7X%2Fimage.png?alt=media&#x26;token=ef1fb0f7-7af1-401c-8edd-209da2eb9648" alt=""><figcaption><p>Drill down to Quarter</p></figcaption></figure>

After drilling down to the lowest level, Month:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FfraXtcu3IG8ntjm65Gdb%2Fimage.png?alt=media&#x26;token=2532fe75-bb2c-4f27-96b6-0f6b384b8996" alt=""><figcaption><p>Drill down to month</p></figcaption></figure>

**Roll up:** Click the <img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FRfQVBD1OMr2SGaMFB8kt%2Fimage.png?alt=media&#x26;token=62ba0ba6-29f4-4480-81e6-00c9473f9919" alt="" data-size="line"> icon to roll up to the next level. You can traverse the hierarchy and roll up to the root level.

Lowermost level, month:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FCcqcS3guEkWGAqFSTx7M%2Fimage.png?alt=media&#x26;token=b1b8d0c7-cbc1-4349-9803-8f95f8b0a2fd" alt=""><figcaption><p>Month level</p></figcaption></figure>

Rolled up one level to quarter.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FhJOFwAeF9rQuxykfUczq%2Fimage.png?alt=media&#x26;token=5e286f34-2ee6-4bb6-85f0-8531dc5783eb" alt=""><figcaption><p>Quarter level</p></figcaption></figure>

Rolled up to root level, year.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FtsqIgQVouKN9vh4rQ3NG%2Fimage.png?alt=media&#x26;token=cb244185-0e0a-4a2b-87fa-538831870d3a" alt=""><figcaption><p>Year level</p></figcaption></figure>

**Fully expand:** Click on the <img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FZ5M0I0GqEt6XiaJXc9oY%2Fimage.png?alt=media&#x26;token=1782f04c-3e88-4c6e-b7c7-af2d7733bb51" alt="" data-size="line">icon to fully expand the hierarchy to the lowest level. Click the icon again to roll up to the root level.

Root level:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F6jlUqH0aY8ERcaKw0dVP%2Fimage.png?alt=media&#x26;token=a0012312-0e96-495e-aa24-32fbf78ee742" alt=""><figcaption><p>Year level of hierarchy</p></figcaption></figure>

Fully expanded:

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fsz9ZAhjtnfQpTn367SW2%2Fimage.png?alt=media&#x26;token=ef1aafc8-1518-430a-8dfa-c50c9e1ca9aa" alt=""><figcaption><p>Expanded to month level</p></figcaption></figure>

### 1.2. Selecting a specific categories

You can select a combination of categories across each level in a multi-level hierarchy. In the examples, we've selected the Channel Partners segment for Germany, the Government segment for France, and All Segments for Canada.&#x20;

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FBTv8wFnDTPg40AD65Oz6%2F2024-04-01_11h30_34.png?alt=media&#x26;token=9254a3f8-b54f-4dac-aba4-b0de99af4486" alt=""><figcaption><p>France - Government</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F307ZKLnVs0LQa9CQYkD9%2F2024-04-01_11h31_38.png?alt=media&#x26;token=542801d8-28d1-4797-91d7-08b212762265" alt=""><figcaption><p>Germany Channel partners</p></figcaption></figure></div>

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FDwJdjUM7DfHYGhwu2lit%2F2024-04-01_11h28_50.png?alt=media&#x26;token=d57b8fe2-c981-451f-922c-2f1a5fa91242" alt=""><figcaption><p>Canada - All Segments</p></figcaption></figure>

### 1.3. Expand and collapse

When the hierarchy has been fully expanded to the lowest level (using the branch icon) you will be able to expand and collapse any level of the hierarchy. You can focus on specific levels of the hierarchy by expanding only those levels.

{% hint style="info" %}
Expand/collapse options are enabled only when Category grouping is enabled.&#x20;

* Navigate to Display Settings > Canvas > Category grouping to enable it for tables.
  {% endhint %}

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FRPjrmRswczqnNpvlvCoa%2Fimage.png?alt=media&#x26;token=f8021866-81ed-4a22-a195-9993d41e1e56" alt=""><figcaption><p>Expand collapse hierachy levels for tables</p></figcaption></figure>

## 2. Hierarchical trellis

Analytics+ allows you to add hierarchies as row and column dimensions in small multiples mode.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Flq8djbmmNHrCOH4PS7ru%2Fimage.png?alt=media&#x26;token=053a4342-9908-45f0-8625-4686ae9bf6aa" alt=""><figcaption><p>Hierarchical dimensions in rows and columns</p></figcaption></figure>

You can also **expand and collapse** the hierarchies added to row and column dimensions. In the example, we have collapsed the US region and Beverages category.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FVA9F0tz9MpMaY0edkdWs%2Fimage.png?alt=media&#x26;token=ec31d375-1f43-4476-9724-3ce166c5c983" alt=""><figcaption><p>Expanding and collapsing hierarchical dimensions</p></figcaption></figure>
