docs: document per-group subtotals for table chart row grouping - #11648
docs: document per-group subtotals for table chart row grouping#11648igorlukanin wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Claude finished @igorlukanin's task in 1m 24s —— View job Review: docs-only, no blockers — 0 high, 2 medium, 2 lowProse is accurate and well-pitched; the non-additive-measure explanation is the right thing to spell out. Four inline comments, none blocking. Full reviewTodos
Findings
Verified
Not verifiedThe behavioral claims (Σ toggle disabled conditions, period-comparison columns left empty, subtotals queried per group grain) describe Cube Cloud frontend behavior that isn't in this repo, so I couldn't check them against source. Worth a second pair of eyes from someone with the feature in hand. |
|
|
||
| Measures built on window functions (`RUNNING_TOTAL`, `OFFSET`, or a SQL `OVER` clause) | ||
| can't be recomputed at another grain, so their cells stay empty on group rows — the same | ||
| behavior as [totals](#totals). Period-comparison columns are also left empty. The toggle |
There was a problem hiding this comment.
The [totals](#totals) link points to the Totals section of this page (line 515), which doesn't say anything about window-function measures being excluded — so "the same behavior as totals" sends the reader somewhere that doesn't confirm the claim. The place that actually documents it is workbooks/querying-data.mdx:184 ("Calculations based on window functions, such as Running total, are excluded — same as for row and column totals"), i.e. /docs/explore-analyze/workbooks/querying-data#subtotals.
Either link there instead, or add the exclusion to this page's Totals section so the anchor pays off.
| open or closed. It only sets the default — a viewer's own expand/collapse of an | ||
| individual group isn't affected by changing it afterwards. | ||
|
|
||
| ### Per-group subtotals |
There was a problem hiding this comment.
This page now has two sections named "subtotals" describing two different features: ### Per-group subtotals here (row-grouping, per group header row) and ### Subtotals at line 519 under Totals (pivot, a Total for ‹value› column per pivot group). They also share most of their semantics — computed at their own grain rather than summed, window functions excluded, unavailable in values-as-rows — so a reader who lands on one has no way to tell it isn't the other.
Worth a one-line disambiguating cross-link in both directions, e.g. here: "Not to be confused with pivot subtotals, which add a column per pivot group rather than a value per group header row." Related: line 511 already says "the row totals and subtotal columns", which becomes ambiguous once both features exist on the page.
| Turning it on also adds a **Row grouping** section to the **Style** tab, with: | ||
|
|
||
| - **Expand all groups** / **Collapse all groups** — set every group's expand state at once. | ||
| - **Subtotals** (Σ) — show an aggregated value for every measure on each group header row. |
There was a problem hiding this comment.
Nit: the other bullets in this list are self-contained, but this one now has a whole subsection behind it. Linking it saves the reader from having to notice the section below.
| - **Subtotals** (Σ) — show an aggregated value for every measure on each group header row. | |
| - **Subtotals** (Σ) — show an aggregated value for every measure on each group header row. See [Per-group subtotals](#per-group-subtotals). |
| is disabled unless grouping is active and the values are placed in columns, since the | ||
| values-as-rows layout has no per-measure column for a subtotal to sit under. | ||
|
|
||
| {/* TODO screenshot: table with collapsed row groups and the Style tab's Row grouping section */} |
There was a problem hiding this comment.
Nit: this TODO previously sat directly after the Row grouping prose it illustrates ("table with collapsed row groups and the Style tab's Row grouping section"). Inserting ### Per-group subtotals above it means it now reads as belonging to the subtotals subsection. Moving it back up to line 59 (before the new heading) keeps it attached to what it depicts — or reword it to cover the Σ toggle too, since a screenshot of the Row grouping section will show that control anyway.
Summary
avgis a true average rather than an average of averages and acount_distinctcounts a value once across child groups. A subtotal can therefore legitimately differ from the sum of the rows beneath it.Test plan