# Table grouping and sorting

Grouping and sorting are the two ways a table arranges its rows. **Grouping** splits the rows into sections by a field, so all the tasks with the same assignee, status, or context sit together under a heading. **Sorting** sets the order of the rows, by due date, priority, or any other field. You can use either on its own or both together, and both are saved in the [preset](/docs/docs-109-table-presets/), so each table keeps its own arrangement.

Open the **Group & Sort** control from the table toolbar to set both.

> **MEDIA-DOCS-107-1:** The Group & Sort popover, showing a group field, a subgroup field, and a list of sort rules.

![MEDIA-DOCS-107-1 - The Group and Sort popover](/assets/docs/media/MEDIA-DOCS-107-1.png?v=e0e5da47d7e6)

## Grouping rows into sections

Pick one field under **Group by** and the table splits into sections, one per distinct value of that field, each with a heading and a task count. Tasks that have no value for the field collect under a **No value** section, so nothing is lost.

- **Group order** sets whether the value sections run in ascending or descending order. When you group by **status**, ascending follows your configured [workflow order](/docs/docs-037-pipelines-and-statuses/) rather than A to Z, and descending reverses that workflow order, so the sections read in the order your work actually flows through.
- The **No value** section stays at the end of its level, even when the group order is descending.
- Each section has a chevron you can click to **collapse** or **expand** it. Collapsed sections stay collapsed as you work. That collapsed state is saved in the [preset](/docs/docs-109-table-presets/), so it travels with the preset across every Table tab, embed, and synced [`.table` file](/docs/docs-114-table-files/), and flipping a sort between A to Z and Z to A leaves your collapsed sections untouched. Changing the grouping field itself starts fresh.
- List and tag fields group by each item in the field. A task with two contexts, for example, can appear under both context sections, because it belongs to both groups.

Grouping is a lens, not a filter: every matching task is still represented, just gathered under headings.

When you group or subgroup by a built-in or custom task **Date** or **Date & time** field, the visible heading follows **Settings → Operon → General → Date format**. Operon still uses the field's canonical value for group identity, collapse state, ordering, and sorting, so changing the display format does not create different groups or rearrange them. Arbitrary [file task property](/docs/docs-115-file-task-property-columns/) date headings keep their stored display in this version.

## Task Tree is context, not grouping

The read-only **Task Tree** column is separate from Group by and Sort by. Expanding a task inserts contextual descendant occurrences beneath that visible parent occurrence, but it does not move or hide the preset's base rows. A child that already matches the filter keeps its normal row and may also appear inside the parent's expanded branch.

Projected descendants inherit the parent occurrence's current group only for visual context. They do not enter group counts, summaries, or export. Existing sort rules still order siblings in a projected branch, but **Task Tree** cannot itself be selected as a group, subgroup, sort, or summary field. Expansion is saved per visible occurrence in the preset, so expanding a task in one branch does not force another occurrence of that task open elsewhere. The same projected rows remain aligned when [Gantt](/docs/docs-139-gantt-view/) is open beside the Table.

## Pipeline: a derived field, not a column

**Pipeline** is a field you can pick for **Group by**, **Subgroup by**, or **Sort by**, but it is not a column you can add to the table. Its value is derived from each task's `status`: Operon works out which of your configured [pipelines](/docs/docs-037-pipelines-and-statuses/) that status belongs to and groups or sorts by the pipeline's name, so a table can organize by pipeline without carrying a duplicate property or a redundant column. A task whose status does not clearly belong to one configured pipeline falls into **No value**, the same as any other ungrouped field.

## Project Serial: grouped by prefix, sorted by number

When you group by the **Project Serial** column, Operon does not give each individual serial its own section. It buckets tasks by their [serial group](/docs/docs-097-project-serials/), the shared prefix, so every `DOCS-` task sits under one **DOCS** heading and every `GIT-` task under a **GIT** heading, while tasks with no serial collect under **No value**. Sorting by Project Serial, whether as the group order or a **Sort by** rule, follows the numeric serial within each group, so `DOCS-7` comes before `DOCS-10` rather than the plain text order that would put `10` before `7`. Group by Project Serial and add it as a sort rule and each project's tasks gather under their prefix, listed in true serial order. This works the same when Project Serial is a subgroup.

## File task properties: grouped and sorted like any other field

A [file task property column](/docs/docs-115-file-task-property-columns/) works as a group, subgroup, or sort field the same as a built-in one, once it is in the table. A discovered `Client` property groups tasks into a section per client; a discovered `Priority score` number sorts them like any numeric field. Because these fields only exist within the preset's current scope, changing the scope can change which discovered properties are available to group or sort by, the same way it changes which ones are available as columns.

## Subgroups: a second level

Once a group is set, you can add a **Subgroup by** a second field to nest sections within sections, for example group by assignee and subgroup by status to see each person's work split into stages. The subgroup has its own order, and it must be a different field from the group. Without a group set, the subgroup option stays disabled.

## Sorting rows

Add one or more **Sort by** rules to order the rows:

- Each rule has a field and a direction, **A -> Z** or **Z -> A**, the same for every field including Status and Pipeline.
- Add more than one rule and they act as tie-breakers in order: the first rule decides the order, the second breaks ties within it, and so on. Reorder the rules with the up and down controls, or remove one.
- With no sort rules, rows follow **Source order**, the order the tasks are found in.

When the table is grouped, sorting applies **within** each section, so the sections are ordered by the group order and the rows inside each section by your sort rules.

## Sort by Countdown

**Countdown** sorts by its selected target date and time, not by text such as `23h` or `2d`. The target is the column’s **Earlier date**, **Scheduled**, or **Due** choice. Expired targets still sort by their original dates even though their cells all show zero; missing targets follow the sort rule’s empty placement.

Countdown is not offered for **Group by** or **Subgroup by**. Use the underlying Scheduled or Due field when you need date groups. See [Table columns](/docs/docs-106-table-columns/) for choosing the target.

## Where empty values go

By default, tasks with no value for a sort field sort to the end. To change that, open the preset's full settings with **Edit preset** and use the **Sort** section, where each rule also carries an **Empty first** or **Empty last** toggle. That decides whether tasks missing the sorted field land at the top or the bottom within their current section, which is useful when, say, unscheduled tasks should surface first rather than sink to the bottom.

The **No value** group is separate from this sort setting. It is the group bucket for tasks missing the grouped field and stays after the value groups, while **Empty first** and **Empty last** control row order for a sort rule. See [Table presets](/docs/docs-109-table-presets/).

## Grouping and summaries together

Grouping pairs naturally with summaries. When a table is grouped, a summary can roll each column up **per section** as well as for the whole table, so a table grouped by assignee can show each person's total estimate or task count on their section's footer. See [Table summaries](/docs/docs-108-table-summaries/).

## Tips

> [!tip] Group by the field you are deciding on, sort by the field you are triaging
> If the question is "who is carrying what", group by assignee; if it is "what is next", sort by due date. Combine them and you get both at once: a section per person, each person's tasks in deadline order. Add a per-section summary and each heading also tells you how much that section holds.

## FAQ

**How is grouping different from filtering?** Grouping keeps every row and gathers them under headings; filtering removes rows. Use grouping to organize, and the search box or the preset's filter to narrow. See [Table overview](/docs/docs-105-table-overview/).

**Can I group by two fields?** Yes. Set a group, then a subgroup, to nest sections within sections.

**Why are some tasks under "No value"?** Those tasks have no value for the field you grouped by. They collect under a single No value section.

**How do I sort by more than one field?** Add several sort rules; they break ties in order. Reorder them to change which field wins.

**Can I group or sort by pipeline without adding a column for it?** Yes. Pick **Pipeline** in Group by, Subgroup by, or Sort by. It reads each task's status and resolves it to the pipeline that status belongs to, with no extra column or property needed.

**Can I group or sort by Task Tree?** No. Task Tree is a presentation column for expanding hierarchy context. Your existing group and sort rules continue to arrange the base Table result.

**Why does grouping by Project Serial make prefix headings instead of one per number?** Grouping by Project Serial buckets tasks by their serial group, the shared prefix, so all `DOCS-` tasks land together and stay in numeric order within that group. See [Project serials](/docs/docs-097-project-serials/).

**Where do tasks with a blank field sort to?** To the end by default. Open **Edit preset** and set a rule to **Empty first** to bring them to the top instead.

## Settings

Grouping and sorting are set from the toolbar's **Group & Sort** control and saved in the preset. The **Empty first** and **Empty last** choice for each sort rule lives in the preset's full settings under **Edit preset**, in the **Sort** section. See [Table presets](/docs/docs-109-table-presets/).

## Related

- [Operon Docs MOC](/docs/docs-001-operon-docs-moc/)
- [Table overview](/docs/docs-105-table-overview/)
- [Table summaries](/docs/docs-108-table-summaries/)
- [Table presets](/docs/docs-109-table-presets/)
- [Table columns](/docs/docs-106-table-columns/)
- [Gantt view](/docs/docs-139-gantt-view/)
- [Pipelines and statuses](/docs/docs-037-pipelines-and-statuses/)
- [Project serials](/docs/docs-097-project-serials/)
- [Table files](/docs/docs-114-table-files/)
- [File task property columns](/docs/docs-115-file-task-property-columns/)
