> 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/explore-and-organize-data/group-rows.md).

# Group rows

Use the **Group By** feature to organize records into logical groups based on shared values. Grouping makes large datasets easier to navigate and analyze. You can expand or collapse individual groups to control the level of detail displayed in the table.

### Group rows

To group rows:

1. From the **PowerTable** tab, select **Group By**.<br>

   <figure><img src="/files/z1dfB197yLfrlg0BsSv4" alt=""><figcaption></figcaption></figure>
2. From the dropdown, select the column to group the records, and then select **Save**.<br>

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

PowerTable groups the records based on the selected column. The following example shows records grouped by the *ProductSubcategoryKey* column. The numerical fields are aggregated as a sum.

<figure><img src="/files/9WVr8rF5IPtOUsFF6P2X" alt=""><figcaption></figcaption></figure>

### Expand or collapse groups

Select the expand or collapse arrow beside a group name to show or hide the records within that group.

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

### Create subgroups

You can create subgroups within a group.

1. Select **Group By** again, then select **Add Sub Group**.<br>

   <figure><img src="/files/uCKW2wram5EIDhcDdvlc" alt=""><figcaption></figcaption></figure>
2. Select another column from the dropdown, and then select **Save**.<br>

   <figure><img src="/files/4eDiK86KsD6V6it7vGa5" alt=""><figcaption></figcaption></figure>

PowerTable creates nested groups within the existing group. The following example shows the records further grouped by the *ModelName* column under *ProductSubcategoryKey.*

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

### Remove grouping

To remove a group, select the delete (bin) icon next to it, and then select **Save**. To return to the default table view, remove all groups.

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

### Work with grouped data

You can continue to perform table operations on grouped records, including:

* Edit data
* Insert rows
* Bulk edit records
* Apply formatting
* Sort records
* Use Find and Replace

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


---

# 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/explore-and-organize-data/group-rows.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.
