DSUM in Collabora Office: Sum Selected Fields with Auditable AND and OR Criteria
Build Collabora database totals with separate criteria tables, compare numeric fields and prevent double-counting when OR conditions overlap.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DSUM totals numeric values in a database field for records matching a separate criteria range. With Cost >=10 in the worked fixture, Units total 10, while Cost totals 58.
Availability and version history
- Introduced: the original Collabora release and launch date are not established by the reviewed sources.
- Availability: documented in Collabora Office 26.04 desktop help.
- Platform scope: online and mobile deployment support is not inferred from the desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independent controls; no native Collabora execution.
Syntax and the required field
=DSUM(Database; DatabaseField; SearchCriteria)
All three arguments are required. Unlike DCOUNT and DCOUNTA, DSUM does not document an omitted-field record-count form. The field determines what is added after criteria select the rows.
The dedicated reference ignores blank or nonnumeric field cells and returns zero when no records match or no numeric field values are available. Those outcomes do not prove that every input was a valid measured zero.
Worksheet setup: keep records and criteria separate
Enter this database in A1:E8, including the header row. Cells marked leave empty must be physically empty; do not type those words or enter an empty-string formula. Enter pending as ordinary text.
| Team | Item | Units | Cost | Note |
|---|---|---|---|---|
| North | A | 4 | 12 | Ready |
| North | B | 0 | 20 | leave empty |
| South | C | 7 | 5 | Ready |
| North | D | pending | 9 | Review |
| South | E | 3 | 8 | leave empty |
| North | F | 6 | 15 | Done |
| North | G | leave empty | 11 | leave empty |
Put the exact header Cost in G1 and the criterion >=10 in G2. The criteria range is G1:G2, including its header. It selects items A, B, F and G. Its column need not be vertically aligned with the database’s Cost column.
Use an empty output cell outside the database and criteria areas for each formula. Do not include unused rows in these criteria ranges. The database range includes all seven records, even though only four satisfy this first criterion.
Example 1: total two different fields
For the primary Cost >=10 selection, use:
=DSUM(A1:E8;"Units";G1:G2)
=DSUM(A1:E8;"Cost";G1:G2)
Expected results are 10 and 58. The Units arithmetic is 4+0+6, excluding G’s empty Units cell. The Cost arithmetic is 12+20+15+11.
The same records were selected for both calculations. Changing the field changes the measured total, not the criterion. The text Item labels are identifiers rather than quantities to add.
Example 2: exclude ordinary text without hiding it
Put Team in G4 and North in G5. =DSUM(A1:E8;"Units";G4:G5) still gives 10, because pending and the empty Units cell contribute no numeric quantity. The North Cost total is 67.
There are five matching records but only three numeric Units values. Pair the sum with DCOUNT or DCOUNTA when missing or nonnumeric data must remain visible. A plausible total is not proof of complete input.
Advanced example: use two conditions on the same field
Put Cost in G7 and H7, >=10 in G8, and <16 in H8. These same-row conditions select A, F and G.
=DSUM(A1:E8;"Cost";G7:H8) gives 38, from 12+15+11. The Units total remains 10 because the excluded B record had numeric Units zero.
A selection change can leave a total unchanged. Inspect record counts as well as sums when verifying criteria logic.
Advanced example: avoid adding overlapping OR totals
Put Cost in J1, >=10 in J2 and >=15 in J3. The two rows express OR. =DSUM(A1:E8;"Cost";J1:J3) gives 58 because the selected union is A, B, F and G.
The first criterion alone totals fifty-eight, while the second alone totals thirty-five. Adding them gives 93, double-counting B’s twenty and F’s fifteen. The combined OR selection does not count a record twice merely because both conditions match it.
For Units, the same mistake would add ten and six to get sixteen instead of the union’s ten. The size of the error depends on the selected field, but its cause is the same overlap.
Advanced example: expose cancellation behind a zero total
In a separate small database, place headers Key and Adjustment in A12:B12 and rows X,5 and Y,-5 in A13:B14. Put Key in D12 and <> in D13 to select nonempty keys under the documented criterion rule.
=DSUM(A12:B14;"Adjustment";D12:D13) gives 0, while =DCOUNT(A12:B14;"Adjustment";D12:D13) gives 2. Zero can represent cancellation between actual observations, not just no records or empty data.
Keep this second database separate from A1:E8. It is a distinct fixture with its own header and criteria ranges.
Error and interpretation limits
The source directly documents the zero result for no matches or no numeric values. It does not turn zero into a unique diagnostic code. Validate the ranges, headers and record count before interpreting the total.
The shared reference has explicit date/logical numeric rules, but this tutorial’s measured fields use ordinary numbers. Mixed error propagation, formula-empty text and locale-dependent text comparisons remain outside these controls.
Field selection and matching scope
The field argument selects the column to calculate after records are matched; it need not be the column used in the criteria. It can be a quoted header, a reference to its header cell, or a one-based column index within the database.
For this table, Units, C1 and index 3 identify the same field. Index three means the third database column, not an absolute worksheet-column number. The shared help says a numeric field index ignores digits after the decimal point, but the examples use integers for clarity.
Criteria in the same row are combined with AND; criteria in separate rows are combined with OR. Repeating a header lets two conditions apply to the same field. Text matching and wildcard or regular-expression behavior depend on Calc’s calculation settings. The primary numeric criterion avoids those pattern choices.
If you use literal Team criteria, enable whole-cell matching and use the exact labels shown. Do not silently treat wildcard and regular-expression modes as interchangeable. The shared database documentation also treats dates and logical values as numeric in these functions; that rule should not be replaced with another aggregation function’s type rules.
References and verification
- Collabora Office 26.04: DSUM.
- Shared database arguments and criteria rules.
- Editorial testing standards.
Complete function-specific and shared database documentation reviewed. Outputs are independent row-selection and arithmetic controls or explicit documented rules, not captured native results. Formulas use English names and semicolon separators.