DCOUNTA in Calligra Sheets: Database Criteria and Worked Examples
Count nonempty matching database cells, including text and Booleans, with a complete Calligra criteria worksheet.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: With the worksheet below, =DCOUNTA(A1:F9;"Note";H1:H2) returns 3. Use DCOUNTA to count nonempty selected fields 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
=DCOUNTA(Database; Field; Criteria)
All three arguments are required. Database includes its column headers. Field is a quoted header such as "Note", 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 Note field. Numeric outputs are independent references, with repeating decimals rounded to twelve places.
| Criteria | Formula | Expected result |
|---|---|---|
| West | =DCOUNTA(A1:F9;"Note";H1:H2) |
3 |
| West and Paid | =DCOUNTA(A1:F9;"Note";J1:K2) |
2 |
| West or East | =DCOUNTA(A1:F9;"Note";M1:M3) |
4 |
| Amount from 75 through 125 | =DCOUNTA(A1:F9;"Note";O1:P2) |
2 |
| ID 103 | =DCOUNTA(A1:F9;"Note";R1:R2) |
1 |
| North | =DCOUNTA(A1:F9;"Note";T1:T2) |
0 |
| Paid | =DCOUNTA(A1:F9;"Note";V1:V2) |
2 |
| Missing team | =DCOUNTA(A1:F9;"Note";X1:X2) |
0 |
Practical example: check whether selected notes exist
The West notes alpha, check and numeric 7 are all nonempty, so =DCOUNTA(A1:F9;"Note";H1:H2) returns 3. Restricting the criteria to West/Paid leaves two nonempty notes and returns 2.
The East Boolean in F7 also counts. DCOUNTA measures whether a selected field is nonempty; it does not establish that the content is sensible, approved, numeric or a useful note.
Advanced example: calculate a completion proportion
For West, the Note count is 3 and the populated ID count is 3, giving a completion proportion of 1, or 100%. For East, put Team in AH1 and East in AH2. The Note count is 1 and the ID count is 3, giving 1/3, about 33.333333333333%.
Use =DCOUNTA(A1:F9;"Note";AH1:AH2)/DCOUNTA(A1:F9;"ID";AH1:AH2) only after checking that the denominator is nonzero and IDs are populated. A Boolean placeholder counts as complete in this calculation; stricter business rules need a separate validation field.
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
All three arguments are required by the registration. An unrecognized field header enters a special source branch that counts matching rows, so a misspelling may not produce an error. Verify the field against A1:F1 before trusting a count.
Genuinely blank cells are skipped. A formula returning text, an error value, or a placeholder needs separate checking: the implementation tests internal emptiness, not visual appearance or usefulness. The worked dataset uses actual blank cells and explicit stored types.