Group your table data

Organize data by bundling common column values via grouping.

Updated over a week ago

Grouping allows you to control how your data is being displayed and comprehended more easily. Groups allow you to easily extract significant themes from datasets, similar to how you might use a pivot table in a spreadsheet. Grouping is especially great for large datasets, categorizing, and filtering data into smaller, digestible pieces.

Within this article you’ll find...

How to group data

Grouping allows you to bundle common column values. Adding a group to one view of a table will not change other views of the data. There are a few ways to group data:

  • In the table options panel, select Group, click Add Group. The default grouping will be on the leftmost column across the left side of the table. You can use the drop-down menu to select which column you would like to group by, and the second drop-down menu to select if you would like to group along the left or across the top.

  • You can also group data by right-clicking on the column header of the column you would like to group and selecting Group, you will be presented with the option to group along the left or across the top.

grouping.gif

Once grouped, you can drag and drop items from one group to another group, this will change the column value of that row to the group you dropped to.

In the table view, you can group multiple times, across both the top and bottom. Please note that grouping across the top is not the same as changing the axes of your table.

How to ungroup data

In the table options panel, select Group, hover over the drop-down menus or gear symbol of the grouping you would like to remove, then click the trashcan that appears.

You can also remove grouping by right-clicking on the column header, selecting Group, and Ungroup column.

Group options

There are a few ways to configure how grouping is displayed. To access group options, head to the table options panel, click Groups, and click on the gear icon of the grouped column you would like to configure.

group options.gif

Sorting

Using the drop-down menu, you can control how you would like to sort the groupings.

  • Custom: drag-and-drop groups in a custom order

  • Ascending: alphabetical order, or ascending numerical order, of the groups

  • Descending: reverse alphabetical order, or descending numerical order, of the groups

  • Source table order: if the grouped column is a relation column, this will sort the grouped data in the same order of the table that is being referenced

  • Source table order (reversed): if the grouped column is a relation column, this will sort the grouped data in the reversed order of the table that is being referenced

Show empty groups

This option will only be visible if your grouped column is a select list or relation column type. Toggle this option on if you would like to display groups that have no rows with this column value.

Pinned groups

Within the Group options, you have the ability to pin groups. A pinned group will always show in the table, even if there are currently no rows associated with that column value. To pin a group, just click the pin icon to the left of the value name. Click the pin icon again to unpin the group. If the pin icon is blue, that means the group is currently pinned. Note that you will not see the pinning option if your column is a select list or relation and the Show empty groups option is toggled on.


Add group

You can use the add group button to easily add a new group from this panel. If the column is a relation, this will add the new value to the related table as well.

Expand and collapse groups

You can collapse an entire group (or groups), by clicking the small carrot that appears in that group. This will show the group, but will not display the individual rows with this column value. Expanding and collapsing groups only affects how you see the data, so you don't have to worry about these actions affecting your teammates.

You do have the option to set a default expand/collapse state for groups in a given table view. This default setting will then determine the initial state that users see when they visit the table. And each user can then choose to collapse or expand for themselves.

To set the default collapsing, open the Group Options panel (right-click on the grouped column header, select Group > Group options). There you'll see a Default collapsing section. You can choose between...

  • Expanded: all groups expanded

  • Collapsed: all groups collapsed

  • Custom: a mix of expanded and collapsed; this will copy whatever combination of collapsed and expanded you are currently utilizing in your view

Groups in boards

One of the most popular view options in Coda is the board view, which leverages grouping to bundle data into lists of cards. Learn more about table views here.

When you change a view into a board, Coda will select a column to group on. Coda will first look for an existing grouping, if this doesn’t exist it will look for a relation or people column, if neither of these column types exist, you may be prompted to add a relation column to group on.

When turning a board into a table, it will retain the grouping that was used to create the board view along the top. If you would like to remove the grouping, follow the process outlined in How to ungroup data.

Frame 1.png

FAQs

Will grouping show for all users of the doc?

Yes, once a column is grouped in a table view, this grouping will be visible whenever anyone in the doc visits that view.

Why are empty groupings showing?

If you’re seeing empty groupings in your table, it is likely because these groups are pinned. If you add a new group from the table view, this group is pinned by default. You can learn more about pinning and how to unpin groups in the Group options section.

When I collapse or expand a group, does this collapse or expand the group for everyone else in the doc?

No - expanding and collapsing is a personal action, so it only affects your view of the grouped data. Learn more about expanding and collapsing groups in the section above.

Can I group on the display column?

While you can group on the display column, it is not recommended. The display column is intended to be the column with the most unique data from row to row. You can learn more about the display column here.

How can I quickly add a new group?

Hover over a grouped column in the table, and look for a small plus icon (when you hover over it +Add a new group will appear). Click on this plus icon to add a new group. Then add a new row to this group if desired.

Why do I see empty rows when I filter a table?

This is most likely because groups have been pinned. Read more about pinned groups in the Group options section.

How do I sort groups?

You can choose how you would like to sort your groups in the group options panel. There are a few different ways you are able to sort depending on the column type. Read more about sorting groups here.

How do I group for a relation column with multiple selections?

Read more about grouping on a select list or relation column with multiple selections here.


Related Resources

Did this answer your question?