> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/documentation/plan/powertable-sheets/how-tos/layout-views-summary/hierarchy-layout.md).

# Hierarchy layout

The **Hierarchy** layout organizes records into parent-child relationships, making it easier to navigate and analyze multilevel data. It provides an alternative to the default **Table** layout and is useful for datasets such as organizational structures, product categories, customer orders, and similar hierarchical data.

To configure a hierarchy layout:

1. In the **PowerTable** tab, select **Layout** > **Hierarchy**.<br>

   <figure><img src="/files/cXoTdtDWpb1Z8ySWjHId" alt=""><figcaption></figcaption></figure>

   \
   The **Hierarchy Layout Configuration** dialog opens.<br>

   <figure><img src="/files/2P125WSkNGMl3DQJrhqH" alt=""><figcaption></figcaption></figure>
2. Select the **Primary Key Column**.

   The primary key uniquely identifies each record in the table. In the following example, *Employee\_Id* is selected as the primary key.
3. Select the **Hierarchy Column**.

   The hierarchy column defines the parent-child relationship between records. In the following example, *Manager\_Id* is selected because it links each employee to their manager in a parent-child hierarchy format.
4. Select the **Display Column**.

   The display column specifies the values shown in the hierarchy view. It must be different from the hierarchy column. In the following example, *Full\_Name* is selected.
5. Select **Save**.<br>

   <figure><img src="/files/RO0KYoQ0h5Bx6SS3oPiu" alt=""><figcaption></figcaption></figure>

The table is displayed in **Hierarchy** layout.

<figure><img src="/files/hh4iNhf2DdlLBb7666Jp" alt=""><figcaption></figcaption></figure>

### Hierarchy layout behavior

After the hierarchy is configured:

* The selected display column is pinned automatically.
* Parent and child records are organized into a hierarchical structure.
* The number of child records is displayed next to each parent record.
* Parent records can be expanded or collapsed to show or hide child records.

<figure><img src="/files/ELrZdXSRQYnHxYA82n4M" alt=""><figcaption></figcaption></figure>

### Modify hierarchy configuration

You can modify the configuration for an existing hierarchy layout.

To modify and manage the hierarchy configuration:

1. In the **PowerTable** tab, select **Layout** > **Manage Layout**.<br>

   <figure><img src="/files/WNVsgWeyqp7KKEDN6hnn" alt=""><figcaption></figcaption></figure>
2. In the **Layout Configuration** window, select **Hierarchy**.<br>

   <figure><img src="/files/t9jFFOBpcWVKsxUbxznQ" alt=""><figcaption></figcaption></figure>
3. Update the required fields such as *Hierarchy Column* and *Display Column* as needed.
4. Select **Save**.

### Insert and manage hierarchy records

Use the three-dot menu on a parent record to perform the following actions:

<figure><img src="/files/IcVmiWLhZJDJSIQ3YIEg" alt=""><figcaption></figcaption></figure>

* **Expand**: Expands the selected parent record to display its child records.
* **Collapse**: Collapses the selected parent record to hide its child records.
* **Insert Child Row**: Adds a new child record under the selected parent. The value in the hierarchy column is populated automatically (*Manager\_Id*). Enter the required values in the remaining fields.<br>

  <figure><img src="/files/yJn9ZXMGHj2LLKK1oI6K" alt=""><figcaption></figcaption></figure>
* **Move To**: Moves the selected record to another parent. Select the required parent from the list, and then select **Move**.<br>

  <figure><img src="/files/F48AV5zf0SPLqo8qKqkj" alt=""><figcaption></figcaption></figure>
* **Show Hierarchy** - View the complete hierarchy for the selected record.<br>

  <figure><img src="/files/XEW2tzh6Br8s0WUUMa80" alt=""><figcaption></figcaption></figure>

To expand or collapse all parent records, use **Expand** or **Collapse All** from the same menu, available at the highest level of the hierarchy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/documentation/plan/powertable-sheets/how-tos/layout-views-summary/hierarchy-layout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
