# Group Rows By

The 'Group Rows' feature in EDITable lets you group the rows based on a selected column. Rows with the same attributes are grouped.

1. Click **Group** from the toolbar.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FJEUKR59Fzwcb1w6umwZb%2Fimage.png?alt=media&#x26;token=956f5609-8241-4d8d-a7a6-4af4ce2e8a63" alt=""><figcaption><p>Group</p></figcaption></figure>

2. Select the column to group by. In the example below, we are grouping rows based on the department ID.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FYa0mvdl59TI0JF4ffu4Z%2Fgroup%20by.gif?alt=media&#x26;token=82e1098d-f169-4c09-b980-c670681eaf3f" alt=""><figcaption><p>Group By</p></figcaption></figure>

3. Within a group, you can create sub-groups. Click on **Add Subgroup** to create a subgroup.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2F3eLL6gBdRmQ0qS1EPqY1%2Fimage.png?alt=media&#x26;token=ccbc5590-75dd-4551-8914-830b442adac7" alt=""><figcaption><p>Add Subgroup</p></figcaption></figure>

4. Select another column to group them. We will select 'TargetBonus'.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2Fo2vwWerivrhfSHW07X1b%2Fimage.png?alt=media&#x26;token=bbf963b5-a36a-4f77-904a-d8f348d94874" alt=""><figcaption><p>Grouping by another column within a group</p></figcaption></figure>

The results are as below:

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FDrsDVtpLnhiRJV5rdA83%2Fimage.png?alt=media&#x26;token=00a2d487-066d-4e47-ab7e-46affa775025" alt=""><figcaption><p>Groups and sub-groups</p></figcaption></figure>

5. Use the arrows to expand or collapse the groups and sub-groups.&#x20;

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FVMoJYW0Bn7TUZTL0ElEK%2Fimage.png?alt=media&#x26;token=e204940f-7236-49fd-a709-acb65dd63948" alt=""><figcaption><p>Expand/Collapse</p></figcaption></figure>

6. Use the three-dot menu to expand all/collapse all or insert a row.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FZPsr0CB8Zaq9nMFquiSW%2Fimage.png?alt=media&#x26;token=8684469e-00cd-4e12-b538-930c24d7736a" alt=""><figcaption><p>Menu options to expand/collapse/insert</p></figcaption></figure>

7. You can edit the table, and perform usual actions like formatting, bulk-editing, inserting rows, using find and replace, etc. on grouped rows too.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2FIao0SqFdAaA6IqZPlBsR%2Fimage.png?alt=media&#x26;token=daf75114-727d-4f7d-85fe-97caf1730d85" alt=""><figcaption><p>bulk-editing after grouping</p></figcaption></figure>

8. You can use the bin icon to ungroup a particular group. To return to the table, ungroup all of them by clicking delete on all groups.

<figure><img src="https://608526116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdpYgiTFFEktmDlcxUGTv%2Fuploads%2F8MEMjSPNYw5fgGAdNSCr%2Fimage.png?alt=media&#x26;token=5f171876-69e3-4f5f-8fb4-0b40f235e61b" alt=""><figcaption><p>Ungroup/delete group</p></figcaption></figure>
