Contact

DAVERAGE in Calligra Sheets: Database Criteria and Worked Examples

Database Intermediate Calligra Sheets

Average matching database records in Calligra, with complete criteria ranges and correct group-weighting examples.

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

Quick answer: With the worksheet below, =DAVERAGE(A1:F9;"Amount";H1:H2) returns 116.666666666667. Use DAVERAGE to average the selected amounts 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

=DAVERAGE(Database; Field; Criteria)

All three arguments are required. Database includes its column headers. Field is a quoted header such as "Amount", 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 Amount field. Numeric outputs are independent references, with repeating decimals rounded to twelve places.

Criteria Formula Expected result
West =DAVERAGE(A1:F9;"Amount";H1:H2) 116.666666666667
West and Paid =DAVERAGE(A1:F9;"Amount";J1:K2) 100
West or East =DAVERAGE(A1:F9;"Amount";M1:M3) 101.666666666667
Amount from 75 through 125 =DAVERAGE(A1:F9;"Amount";O1:P2) 98
ID 103 =DAVERAGE(A1:F9;"Amount";R1:R2) 150
North =DAVERAGE(A1:F9;"Amount";T1:T2) 45
Paid =DAVERAGE(A1:F9;"Amount";V1:V2) 81.666666666667

Practical example: compare selected averages

West amounts are 75, 150 and 125. Their sum is 350 and their count is 3, so the average is 116.666666666667. Restricting the criteria to West/Paid leaves 75 and 125, whose average is 100.

The North average is 45, because both 90 and the real zero are included. A zero is a measurement, not a blank. Removing that row or replacing zero with an empty cell changes the denominator and the meaning of the result.

Advanced example: combine unequal groups correctly

West has three amounts totaling 350; North has two totaling 90. Their combined average is (350+90)/(3+2) = 88. Averaging the two group averages without weights instead gives about 80.833333333333, which assigns equal weight to groups of unequal size.

For a direct check, put Team in AH1, West in AH2 and North in AH3. =DAVERAGE(A1:F9;"Amount";AH1:AH3) should give 88. The criteria rows select either team, while each underlying order keeps equal weight.

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

The help describes averaging numbers, but the current evaluator accumulates every nonempty selected field through Calligra’s value arithmetic and increments the count. Clean the target field to numeric values rather than assuming that text or errors will be ignored like they are in another program.

With no qualifying nonempty field values, the evaluator returns an empty internal value. Its displayed result was not natively checked; do not substitute a promised zero or a specific spreadsheet error for that source fact.

Official references