Sort and group
Sort
Press s on a column to sort by it. Press again to reverse, and a third time to turn it off: ▲ → ▼ → off.
To sort by more than one column, press s on another column. It becomes the
tie-breaker. Sorting by region and then amount puts the regions in order and,
within each region, the amounts in order. The header shows the order with ①▲ and
②▼.
S clears every sort.
Group
Grouping turns rows into a summary, like a pivot table. To get total sales per region:
- Go to
regionand press b. It’s now a group key. - Go to
amountand press a until it shows Σ (sum). - Press B.
You get one row per region, with a column called amount_sum.
a cycles through these:
| Symbol | Means |
|---|---|
| Σ | Sum |
| μ | Average |
| # | Count |
| ↓ | Smallest |
| ↑ | Largest |
You can group by several keys, and summarise several columns at once. Columns that are neither a key nor summarised are left out of the result.
Filters and sorts still apply once the rows are grouped. Press B again to go back to the full table.