Contact

Calligra Sheets · Summaries and analysis · Intermediate

Create Grouped Subtotals in Calligra Sheets

Insert subtotal formulas for adjacent groups on a disposable copy, verify the generated ranges and avoid double-counting the grand total.

Documentation and pinned source reviewed; native verification pending · Editorial standards

Add subtotal rows to a short, already grouped list and reconcile them with its original records. This is the Data → Subtotals action, not a Pivot table, a cross-sheet consolidation, or merely typing a SUBTOTAL formula into an existing report.

Scope and safety

The procedure is reviewed against official source at commit 72123cc643f6625351139e7df294544255a1056f. The KDE handbook at stable_kf6 still identifies itself as revision 2.7, March 11, 2013; it confirms the feature concept, not present-day runtime behavior. English Linux/KDE controls below come from pinned source. No new native application run, screenshot, successful save/reopen or compatibility round trip is claimed. Stop if your installed build lacks these controls.

Subtotals rewrites and expands the selected block in place. Work on a fresh disposable sheet with no unrelated data below it. Reserve A1:B12 for this tiny example. The reviewed action is not a safe insertion promise for an occupied report; do not expect it to move unrelated cells out of the way. Keep a separate unmodified source file.

Enter the following values individually. This avoids clipboard/import assumptions and deliberately supplies adjacent groups, not a list needing a sort.

Cell Entry
A1 Region
B1 Units
A2 North
B2 20
A3 North
B3 30
A4 South
B4 40
A5 South
B5 10

Independent checks: North 50, South 50, all four records 100. Save subtotals-base.ods, then Save As subtotals-working.ods before applying the command.

Configure exactly one grouping and one measure

  1. Select A2:B5, excluding row 1. The pinned implementation processes every selected row; it has no header-skip option. Including A1:B1 would treat the heading as another group.
  2. Choose Data → Subtotals…. The selection must be one rectangular block, at least two rows and two columns, not whole columns or disjoint areas.
  3. Set At each change in: to Column ‘A’. The dialog lists column letters rather than using Region as a field name.
  4. Set Use function: to Sum explicitly. Do not leave the function at a default such as Average.
  5. Under Add Subtotal to: check Column ‘B’ only. At least one output column is required; do not sum the group labels.
  6. Open Details. Enable Summary below data, leave Summary only off, and clear Ignore empty cells when looking for changes. This fixture has no empty group cells, so ignoring them is unnecessary and could conceal missing labels in a larger list.
  7. Click OK once and inspect the resulting block. Do not immediately run the command again over a guessed range.

The expected structure derived from the source is:

Row Column A Column B
1 Region Units
2 North 20
3 North 30
4 blank =SUBTOTAL(9;B2:B3) → 50
5 South 40
6 South 10
7 blank =SUBTOTAL(9;B5:B6) → 50
8 blank =SUBTOTAL(9;B2:B7) → 100

The action does not add descriptive text in column A for these generated rows. Identify them by formula and position, not by an assumed “North Total” label. The semicolon formulas shown are the source-generated form; inspect actual formulas if the local display normalizes references differently.

If row counts, original labels, data associations or generated ranges differ, stop and reopen the source copy. These are expected source-derived checkpoints, not recorded application results.

Reconcile without counting totals twice

On the working copy, put these audit formulas well outside the output area:

Cell Formula Expected
D2 =B4+B7 100
D3 =B8-D2 0
D4 =SUM(B2:B7) 200
D5 =B2+B3+B5+B6 100
D6 =B8-D5 0

D4 is intentionally wrong for the report’s grand total: it sums both original values and their subtotal rows. The generated B8 uses SUBTOTAL instead. The pinned function excludes cells whose formulas contain SUBTOTAL, preventing the two generated group totals from being counted again in this fixture. Do not replace B8 with a plain SUM over the mixed detail-and-subtotal block.

Change B2 from 20 to 25. North’s subtotal should become 55, South should remain 50, B8/D2/D5 should become 105, D3/D6 should remain 0, and D4 should become 210. This verifies the result is formula-based rather than a static snapshot. Restore 20 and check the original checkpoints again.

Save as subtotals-final.ods, close and reopen a copy, then repeat the formula and change checks. Persistence and recalculation in an installed build are still reader verification steps, not evidence from this audit.

Group order matters

The action inserts a subtotal whenever the selected grouping cell’s input changes. It does not combine every matching label anywhere in the sheet, and it does not sort the data first.

For the sequence North 20, South 40, North 30, South 10, expect four runs rather than two region groups. A grand total of 100 can therefore coexist with the wrong report structure. Check both the grouping and the total. If a real list needs sorting, first make a source copy and sort complete rows by the grouping column, then verify every row association before using Subtotals. The pre-grouped fixture here does not depend on a newly tested sort.

Grow from the clean source, not the generated report

Reopen a copy of subtotals-base.ods, add A6 South and B6 5, and save it under a new name. Select A2:B6 and repeat the same options. The independent expectations become North 50, South 55, grand total 105. The generated subtotal rows should now be 4 and 8, with the grand total on row 9. Update any audit formulas to match that new layout; the earlier B7/B8 checks no longer name the same results.

Do not append a raw record beneath a generated grand total and assume it is included. Rebuild from the clean source when adding groups or records. To recover from a mistaken run, discard the disposable working copy and recreate it from the preserved baseline. This is more predictable than relying on Remove All, repeated application or Undo after reopening.

Boundaries that remain unverified

  • Use literal labels and numeric measures here. The current source recognizes existing subtotal rows by searching formula text for subtotal; broader mixed-formula lists require separate review, not an assumption that detection is exact in every case.
  • Hidden-row filtering, Summary only, Remove All, blank-label omission and nested grouping are not exercised by this guide. The generated Sum uses function code 9, not a promise that manually hidden rows will be excluded.
  • Do not infer Pivot availability from this action. The older handbook’s Pivot entry is a separate historical feature; this tutorial does not remove that compatibility hold.
  • No export/import or other-application round trip is covered. Keep .ods source and working copies separate.

For a summary across matching monthly sheets, use Consolidate. For a two-way formula report without inserting rows into the source, see the helper-key sales summary.

Primary sources and verification boundary

Independent arithmetic and source-derived row/formula checks support the expected results. They do not constitute native Calligra execution, screenshots or persistence validation.