# Hierarchies in cards

## 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%2FoERb0gq6mjE8JxPXzwb0%2Fimage.png?alt=media&#x26;token=77d98674-26d0-43d2-960b-515acd1cc578" 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.  Click the images below to see how we've drilled down from the highest level (year) to the quarter level and then to the lowest level (month).

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FmPwYtLQsSc94M0sUdHyd%2Fimage.png?alt=media&#x26;token=3e7eae37-4359-42d9-a522-2f02912c3e7e" alt=""><figcaption><p>Year level</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F4IPwJLu1GNY8x2sziqrv%2F2024-04-29_14h06_05.png?alt=media&#x26;token=152cab09-5d64-44bb-a339-b173cb6a233f" alt=""><figcaption><p>Drill down to quarter level</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FeOG3yJmM2B71JPuCrGe1%2F2024-04-29_14h09_37.png?alt=media&#x26;token=6678e4a1-c6df-4a9f-9a63-f1b8e46476af" alt=""><figcaption><p>Drill down to month level</p></figcaption></figure></div>

**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. Click the images below to see how we've drilled up from the lowest level (month) to the quarter level and then to the highest level (year).

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FyQzIvt4YKcfusFSmMZZq%2Fimage.png?alt=media&#x26;token=fcbf3f1f-fe5e-4abe-912f-3d54f7f2db34" alt=""><figcaption><p>Month level</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FkR6MK5pawknNw9thVkMH%2F2024-04-29_14h13_03.png?alt=media&#x26;token=f008e3e2-28ac-42d1-943e-a619656b7f24" alt=""><figcaption><p>Drill up to quarter level</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FUxrApmT2xORr9MAyPz9u%2F2024-04-29_14h14_32.png?alt=media&#x26;token=4e0349f8-14d4-42fb-94c3-368d4b68ad13" alt=""><figcaption><p>Drill up to year level</p></figcaption></figure></div>

**Fully expand:** Click on the <img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FPlw3knATH4pVfafZtpfi%2Fimage.png?alt=media&#x26;token=cface76d-3b23-4852-a95f-3158445e7bef" 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.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FkyN1V8283SFem6XCRHjL%2Fimage.png?alt=media&#x26;token=aeac9b44-de09-4cf2-9b58-c1cb74c0b08a" alt=""><figcaption><p>Highest level of the hierarchy</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FEmEa2JinueqeJCMAgdj5%2F2024-04-29_14h21_08.png?alt=media&#x26;token=b7c7cd24-b438-4496-bfcb-ca2586a80d78" alt=""><figcaption><p>Fully expanded hierarchy</p></figcaption></figure></div>

### 1.2. Selecting a specific categories

After you drill down, you can select a category within the hierarchy level. In this example, we have drilled down to the month level and Q4 is displayed for all 3 years. You can choose a specific year or a specific quarter from the dropdown.&#x20;

* We've changed the quarter from Q4 to Q2. Notice how the months change from Oct - Dec to Apr - June. &#x20;

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F9cp9NEkPiQYcKRaWIpHH%2Fimage.png?alt=media&#x26;token=4bb5f11d-b18d-43e0-890e-31ec568c56e9" alt=""><figcaption><p>Selecting a quarter</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F4yXI7zeksybjiNOzkmOh%2F2024-04-29_16h09_37.png?alt=media&#x26;token=c198e085-ef54-4263-a016-bb16c8f79e04" alt=""><figcaption><p>Q2 selected</p></figcaption></figure></div>

* You can also select the small multiple category from the dropdown.

<div><figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FpaVedEXJ5xDZRJOMdVz2%2Fimage.png?alt=media&#x26;token=24482ede-3524-4885-a3ea-7e4a98c45779" alt=""><figcaption><p>Selecting a small multiple category</p></figcaption></figure> <figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F4N8jiiOjh7Q7RRY6XIei%2F2024-04-29_16h14_02.png?alt=media&#x26;token=e16c5bc9-3cdf-49e0-8ff2-ef2e582d26b8" alt=""><figcaption><p>Region changed from APAC to Pacific</p></figcaption></figure></div>

### 1.4. 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 > Axis > X-Axis > Category grouping to enable it for charts.
  {% endhint %}

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2Fa0PJs6j0yhD1QSHNG5Da%2Fimage.png?alt=media&#x26;token=55c953f1-1027-4bbd-9098-8b4120b3be35" alt=""><figcaption><p>Expand collapse selected levels of the hierarchy</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%2Fae0hji9SmtIrVooYUeJ7%2Fimage.png?alt=media&#x26;token=3f9caf7d-1fc2-473b-86aa-d0c28be916e7" alt=""><figcaption><p>Hierarchical row and column dimensions</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%2FvOvXkw36etb4usYNz6fV%2Fimage.png?alt=media&#x26;token=c947d956-b53b-4f73-b62a-5f904162e522" alt=""><figcaption><p>Expanding and collapsing hierarchical dimensions</p></figcaption></figure>
