Contact

DPRODUCT in Calligra Sheets: Database Criteria and Worked Examples

Database Intermediate Calligra Sheets

Multiply selected database values in Calligra, with zero handling, OR criteria and an independent-choice example.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: With the worksheet below, =DPRODUCT(A1:F9;"Units";H1:H2) returns 75. Use DPRODUCT to multiply the selected numeric values after applying a separate header-based criteria range.

Availability and version history

  • Introduced: First release not established; the name is present in Calligra 2.4.0 source.
  • Supported in: Calligra Sheets 26.08.2.
  • Scope: Desktop Sheets, with the database function module available. No retirement endpoint is established.
  • Checked: October 14, 2026. Official help and pinned source checked; examples independently calculated. Calligra was not run, so source-defined edge behavior is distinguished from displayed native results.

Syntax and arguments

=DPRODUCT(Database; Field; Criteria)

All three arguments are required. Database includes its column headers. Field is a quoted header such as "Units", or a valid one-based column number. Criteria is another range containing header names and at least one condition row. Semicolons separate arguments in these examples. Function help; three-argument registration.

Build the example database

Enter this table in A1:F9, including the header row. An empty table entry means leave the cell genuinely blank. Enter 7 as a number in F6 and =TRUE() as a Boolean in F7; do not type the word “blank” into the empty cells.

ID Team Amount Units Status Note
101 West 75 3 Paid alpha
102 East 120 4 Paid
103 West 150 5 Pending check
104 North 90 2 Paid
105 West 125 5 Paid 7
106 East 60 3 Pending TRUE
107 North 0 0 Paid
108 East 80 4 Paid

Create these separate criteria blocks. Repeat a header where the table asks for it; each block includes its own header row. In two-column blocks, put the semicolon-separated entries in adjacent cells, not together in one cell.

Range Header cell(s) First condition row Second condition row
H1:H2 Team West none
J1:K2 Team; Status West; Paid none
M1:M3 Team West East
O1:P2 Amount; Amount >=75; <=125 none
R1:R2 ID 103 none
T1:T2 Team North none
V1:V2 Status Paid none
X1:X2 Team Missing none

“None” means the range ends before another condition row. Type >=75 and <=125 as criterion text. Keep the conditions outside A1:F9.

Reproducible results

These formulas all use the Units field. Numeric outputs are independent references, with repeating decimals rounded to twelve places.

Criteria Formula Expected result
West =DPRODUCT(A1:F9;"Units";H1:H2) 75
West and Paid =DPRODUCT(A1:F9;"Units";J1:K2) 15
West or East =DPRODUCT(A1:F9;"Units";M1:M3) 3600
Amount from 75 through 125 =DPRODUCT(A1:F9;"Units";O1:P2) 480
ID 103 =DPRODUCT(A1:F9;"Units";R1:R2) 5
North =DPRODUCT(A1:F9;"Units";T1:T2) 0
Paid =DPRODUCT(A1:F9;"Units";V1:V2) 0
Missing team =DPRODUCT(A1:F9;"Units";X1:X2) #VALUE!

Practical example: combinations across independent stages

Treat the West Units values 3, 5 and 5 as the number of choices at three independent stages. =DPRODUCT(A1:F9;"Units";H1:H2) gives 75 combinations, because 3×5×5=75. This interpretation requires one choice at each stage and independence between the options.

If Units instead represents stock quantities that should be added, a product answers the wrong question. DPRODUCT multiplies values; it does not infer whether multiplication makes sense for their units or business meaning.

Advanced example: OR criteria do not duplicate factors

M1:M3 selects West or East, giving factors 3, 4, 5, 5, 3 and 4. Their product is 3600. Each database row is included once even if it matches more than one criteria row.

To demonstrate that, put Team in AH1 and West in both AH2 and AH3. =DPRODUCT(A1:F9;"Units";AH1:AH3) still returns 75, not 75×75. Separate matching criteria are alternatives, not instructions to multiply the same records again.

Criteria rules that prevent silent mistakes

Conditions on the same criteria row are ANDed; different criteria rows are ORed. Repeated headers let one field satisfy two conditions. A wholly blank condition row can match every database row, so do not extend a criteria range through spare empty rows. A header-only range has no condition row and selects no data rows.

The parser silently ignores unrecognized criteria headers. A misspelled header can therefore broaden the selection, potentially to every record. Match headers carefully and test the selected IDs before relying on an aggregate. Plain words such as West in this example avoid pattern metacharacters; wildcard and regular-expression behavior depends on workbook settings. Criteria parser; condition interpretation.

Errors and data checks

A selected zero makes the product zero: North’s 2×0 and the Paid selection both show this. An unknown field or no qualifying nonempty values returns #VALUE! in the pinned evaluator; it does not return the empty-product convention 1.

The evaluator multiplies every nonempty selected field through Calligra’s value arithmetic, without an explicit numeric-only filter. Use numeric factors, validate errors and text beforehand, and watch for overflow when multiplying many large values.

Official references