LibreOffice Calc · Pivot analysis · Intermediate
Calculate pivot percentages and running comparisons
A worked Calc example to calculate pivot percentages and running comparisons, with source checks, changed inputs and recovery.
Documentation-qualified for Calc 26.2; native workflow and persistence checks pending · Editorial standards
A pivot’s displayed-value calculation can show contribution percentages, differences and cumulative totals without changing source amounts. The denominator and item order are part of the calculation, so verify them before formatting the result as a percentage.
Prepare an ordered summary
Use LibreOffice Calc 26.2 desktop, English standard menus on Windows/Linux, and a disposable ODS file. These are documentary instructions and independently calculated expectations; native execution and reopening remain unverified.
On Sales, enter A1:C7:
| Period | Region | Amount |
|---|---|---|
| P01-Jan | North | 100 |
| P01-Jan | South | 100 |
| P02-Feb | North | 150 |
| P02-Feb | South | 50 |
| P03-Mar | North | 200 |
| P03-Mar | South | 100 |
Use Period in Row Fields, Region in Column Fields and Sum of Amount in Data Fields. Send the pivot to a separate sheet. The P01/P02/P03 prefixes make the required text sort order unambiguous; this is not a date-grouping exercise. For setup and source repairs, see pivot basics.
The ordinary summary is January 200, February 200 and March 300. North totals 450, South 250 and the overall sum is 700. Record these controls separately, because the following views replace displayed amounts rather than creating new underlying sales.
Show each region’s share of a period
- Right-click inside the pivot and choose Properties.
- Double-click Amount in Data Fields. Leave the aggregate function at Sum.
- Expand Displayed value and select % of row as Type. No Base field/item is needed for this type.
- Confirm both dialogs and inspect the detail cells.
North/South should be 50%/50% for January, 75%/25% for February and about 66.67%/33.33% for March. The two region shares in each period sum to 100%, subject to rounding. “75%” now means North’s share of February, not February’s share of all sales.
Switch Type to % of total and inspect January North: 100/700 = 14.2857%. February North is 150/700 = 21.4286%. These six detail cells together sum to 100%. Do not add grand-total percentages to the detail percentages when checking that sum.
If fractional values appear as currency, repair the number format. Calc carries source formatting into pivot results and direct formatting can reset on refresh; use appropriate pivot styles for a reusable report and recheck after updates.
Compare with a fixed baseline, then accumulate
Reopen Displayed value and select Difference from, with Base field Period and Base item P01-Jan. February North is 150 − 100 = 50; February South is 50 − 100 = −50. March differences are 100 and 0. Check non-baseline items rather than assuming the baseline row’s blank/zero presentation.
Next choose Running total in, Base field Period. Verify the visible Period order is P01-Jan, P02-Feb, P03-Mar. North’s cumulative results should be 100, 250, 450 and South’s 100, 150, 250. Calc accumulates in the field’s sort order, not in an invisible calendar order. Sorting by sales amount would change the question.
The tool also offers comparisons to previous/next visible items. Filtering can change which item is adjacent, so a fixed named baseline is safer when the business question explicitly means January.
Change one driver and restore the ordinary report
Change the February North source amount from 150 to 170 and refresh the pivot. Running North totals should be 100, 270, 470; South remains unchanged. Switching to % of row should make February North 170/220 = 77.2727% and South 22.7273%.
Restore 150, refresh, and set Displayed value back to Normal. Confirm the original amount matrix and total 700 before saving. Close and reopen the ODS and check the selected display mode as well as the numbers. If a ratio looks wrong, inspect filters, base item and sort order first; do not type a replacement percentage over calculated pivot output.
Official references
Sources were captured on 20 October 2026 and reviewed from retained snapshots. All outcomes above are expected checks, not a claim of native execution.