DVAR in Collabora Office: Filtered Sample Variance
Calculate sample variance for matching database records, distinguish numeric values from record counts, and investigate zero or one-value results.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DVAR calculates sample variance in one field after database criteria select the records. For the three measured times 4, 8 and 12 minutes, the expected result is 16 square minutes, even when the selected records also contain missing measurements.
Availability and version history
This guide uses the official DVAR reference retrieved on October 22, 2026. The saved page identifies itself as Collabora Office 26.04 Help, but its /latest/ address is rolling, not an immutable release URL. The first release, current free-edition entitlement, installed-build behavior, and Online or mobile parity are not established here. Examples are independently calculated, not native Collabora results.
Syntax and field selection
=DVAR(Database; DatabaseField; SearchCriteria)
Supply all three arguments. The database includes its header row, and the criteria range includes matching field headers plus condition rows. The calculation field can be a quoted header, its header-cell reference, or a one-based position within the database. It need not be the field used for filtering.
The worked examples use English function names, semicolon separators, ordinary numbers, plain text and physically empty cells. Pattern matching and locale-dependent text criteria are outside this exercise. For full AND/OR layouts, see DSUM’s database criteria examples.
Set up a small measurement log
Enter the following original practice data in A1:D11. Type pending as text. Leave the two cells marked leave empty physically empty, without typing those words or an empty-string formula.
| Run | Batch | Shift | Minutes |
|---|---|---|---|
| 101 | 10 | 1 | 4 |
| 102 | 10 | 1 | 8 |
| 103 | 10 | 2 | 12 |
| 104 | 10 | 2 | pending |
| 105 | 10 | 2 | leave empty |
| 106 | 20 | 1 | 6 |
| 107 | 20 | 1 | 6 |
| 108 | 20 | 2 | 6 |
| 109 | 30 | 1 | pending |
| 110 | 30 | 2 | leave empty |
Put Batch in F1 and numeric 10 in F2. Use F1:F2 as the complete criteria range and place output formulas in an unused area, such as H1 downward.
Example 1: use the numeric count, not the record count
=DVAR(A1:D11;"Minutes";F1:F2)
Expected result: 16. Five records match Batch 10, but only 4, 8 and 12 are numeric measurements. Their mean is 8. The squared deviations are 16, 0 and 16, totaling 32. Sample variance divides that total by 3 - 1, giving 16.
For an audit beside the result, use:
| Formula | Expected result | Meaning |
|---|---|---|
=DCOUNT(A1:D11;;F1:F2) |
5 | Matching records |
=DCOUNT(A1:D11;"Minutes";F1:F2) |
3 | Numeric measurements |
Using 5 - 1 as the denominator would incorrectly produce 8. The two unmeasured records are not extra zero-valued observations. See DCOUNT for the distinction between counting records and counting a numeric field.
=DVAR(A1:D11;D1;F1:F2) and =DVAR(A1:D11;4;F1:F2) select the same Minutes field. Position 4 means the fourth database column, not a universal worksheet column number.
Example 2: restrict the sample to one shift
Put Batch and Shift in F4:G4, then numeric 10 and 1 in F5:G5. Both conditions must hold because they occupy the same criteria row.
=DVAR(A1:D11;"Minutes";F4:G5)
Expected result: 8. The selected measurements are 4 and 8, with mean 6 and squared deviations totaling 8. The denominator is now 2 - 1. Changing the criteria changes both the data and the sample size; it does not merely remove a contribution from the previous variance.
Example 3: a real zero changes the sample
In a copy of the practice sheet, replace D6, the empty Minutes cell for Run 105, with numeric 0. Keep F1:F2 set to Batch 10.
The selected numeric values become 4, 8, 12 and 0. Their mean is 6, their squared deviations total 80, and the expected DVAR result is 80/3, approximately 26.666667. The numeric count rises from 3 to 4.
This is a deliberate input change, not a missing-data repair. Enter zero only if the measured quantity really was zero. Restore D6 to empty before using the original fixture’s other results.
Troubleshooting zero and one-value results
The following are documented DVAR outcomes, not results observed in Collabora during this review:
- With F2 set to 99, no records match. The reference specifies 0.
- With F2 set to 30, two records match but neither Minutes cell is numeric. The reference also specifies 0.
- With Run in F7 and 101 in F8,
=DVAR(A1:D11;"Minutes";F7:F8)selects one numeric observation. The reference specifies #NUM!. It also specifies that error when multiple matched records provide only one numeric value.
By contrast, Batch 20 has three genuine measurements of 6. Its independently calculated variance is 0 because all observations are equal. Always inspect both DCOUNT results before interpreting zero as consistency.
The source’s one-record and no-numeric statements overlap for a single matching nonnumeric record. That combined case is not resolved by this guide. Mixed input errors, numeric-looking text and formula-empty strings are also not tested here.
Choose the statistic before interpreting it
DVAR returns squared units. For a result in minutes, use DSTDEV, whose expected result for the original Batch 10 is 4. If the selected numeric observations are the entire population being described rather than a sample, DVARP uses a different denominator and gives 32/3, approximately 10.666667. Missing measurements still need attention in either case.
References and verification
- Collabora Help: DVAR contract, syntax and boundaries.
- Shared database arguments and criteria.
- Editorial testing standards.
Row selections, counts, exact variances and rounded outputs were independently checked using rational arithmetic and Python statistics. Source-defined zero/error behavior is kept separate from those numeric checks. No native execution, screenshot or cross-platform validation is claimed.