Zoho Sheet DSUM Function: Criteria-Based Totals
Sum database fields using explicit criteria, signed adjustments and row-level amount calculations.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
DSUM adds one database field for records selected by a criteria range. In the complete example below, Red-team amounts are 20,60,20,30, so the selected sum is 130. Criteria determine the records; the field argument determines which numbers are added.
Availability and verification
Zoho’s official DSUM documentation was retrieved on October 15, 2026. It documents the function in the rolling web service. The first release and last functioning version are unknown; this is not a historical build test. Mobile/offline parity is unverified. Results below are independently worked expectations, not captured Zoho Sheet execution. The datasets are fictional and fully specified.
Syntax and database layout
DSUM(database; field; criteria)
All three arguments are documented. database includes a header row and its records. field identifies the column to process, using either its quoted header text or a reference to that header cell. criteria points to a separate range containing the relevant header and condition. The condition column and the result field can be different.
Use semicolons as shown in Zoho’s English reference; adjust separators if the workbook locale requires it. A header reference such as E1 is unquoted, whereas a literal name such as “Amount” needs quotes. These examples use explicit field names, not an assumed numeric field index or omitted argument.
Build the complete source table
Create a sheet named Jobs. Enter the following data in A1:F7. Headers are literal text; Units, Rate and Duration are numeric. In E2 enter =C2*D2 and fill through E7 to generate Amount. The displayed amounts below are checks, not extra inputs.
| Row | A: Ticket | B: Team | C: Units | D: Rate | E: Amount | F: Duration |
|---|---|---|---|---|---|---|
| 2 | T01 | Red | 2 | 10 | 20 | 8 |
| 3 | T02 | Blue | 3 | 12 | 36 | 20 |
| 4 | T03 | Red | 4 | 15 | 60 | 12 |
| 5 | T04 | Red | 1 | 20 | 20 | 16 |
| 6 | T05 | Blue | 5 | 8 | 40 | 30 |
| 7 | T06 | Red | 3 | 10 | 30 | 24 |
Set H1 to Team and H2 to Red. Set J1 to Team and J2 to Blue. These are two separate criteria ranges, H1:H2 and J1:J2. Red selects rows 2,4,5,7; Blue selects rows 3,6. Use the formulas on Jobs so the unqualified references point to this dataset.
Calculate and audit the group totals
| Cell | Formula | Expected result |
|---|---|---|
| H4 | =DSUM(A1:F7;"Amount";H1:H2) |
130 |
| H5 | =DSUM(A1:F7;E1;H1:H2) |
130 |
| J4 | =DSUM(A1:F7;"Amount";J1:J2) |
76 |
| H6 | =DSUM(A1:F7;"Units";H1:H2) |
10 |
| J6 | =DSUM(A1:F7;"Units";J1:J2) |
8 |
H4 and H5 differ only in how the field is identified. H6 uses the same selected records but sums Units instead of Amount. In L1 enter Team and leave L2 physically empty. =DSUM(A1:F7;"Amount";L1:L2) should give 206 under Zoho’s documented blank-below-header selection rule. Keep L1 in the range; a missing criteria table is a different input.
Since every record belongs to exactly one of these two teams, H4+J4 is also 206. That partition check is useful only because the two supplied groups are exhaustive and non-overlapping. It is not a general guarantee for arbitrary overlapping criteria.
Changed-input controls
Duplicate Jobs as JobsRefund. Change only C5 from 1 to -1, keeping E5 as its formula. E5 becomes -20; the Red total becomes 90, Red units 8, and the all-team amount 166. Blue remains 76. This models a signed adjustment, rather than treating a refund as an unsigned positive sale.
In a separate fresh copy, change only H2 from Red to Blue. H4 becomes 76 and H6 becomes 8. The data stay unchanged. This separates a criteria change from an input-value change.
Advanced: calculate amounts before aggregating
DSUM processes one field; it does not multiply Units by Rate row by row merely because both columns exist. The helper Amount field makes that operation explicit. Red’s amount is 2×10 + 4×15 + 1×20 + 3×10 = 130.
On the original sheet, =H4/H6 is 13, the amount per unit across those Red records. It is a quantity-weighted rate. The arithmetic mean of the four listed rates is 13.75, which answers a different question. Keep a zero-unit denominator visible instead of replacing every division error with zero. The ratio is meaningful only if quantities, rates and signed adjustments follow a consistent business convention.
Add a hypothetical row T07,Red,2,25 and Amount50 in a copy. A formula still pointing at A1:F7 remains 130 because the new row is outside it. Updating the database range to A1:F8 gives 180. This control catches a common growing-table omission.
Errors and troubleshooting
The official DSUM page lists shared name, type and reference errors. It does not exhaustively specify no-match behavior, mixed-type coercion, wildcard rules, duplicate header handling or every exact error token. Do not import those details from another spreadsheet product simply because the function name matches.
Start with the small dataset above. Confirm that the database includes row 1, the criteria header matches the intended field and all references point to the intended sheet. Inspect underlying cell contents rather than display formatting. Keep criteria outside the source records so editing a condition does not alter the database. A correct formula can still answer the wrong question if its range omits newly appended rows.
Before transferring a workbook, compare these controls in the destination app. This guide does not establish Excel, Numbers or other products’ syntax, error or version equivalence.