Contact

DSTDEVP in ONLYOFFICE: Population Standard Deviation for Matching Records

Database Intermediate ONLYOFFICE

Measure conditional population spread, compare the sample divisor, and handle zero, singleton and mixed-type selections carefully.

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

Quick answer: =DSTDEVP(A1:D6,"Amount",Q1:Q2) has the independent target 8.16496580927726 for East values 10,20,30. It divides squared deviations by the full selected numeric count n before taking the square root.

Syntax and arguments

=DSTDEVP(database, field, criteria)

Database includes its first-row headers. Field is a quoted header or a one-based column position within that database. Criteria is a separate block with recognized headers and at least one condition row. The official help documents this three-argument interface. Keep headers unique in the database and copy criteria headers exactly.

Build the database and criteria blocks

Create a blank sheet named DatabaseChecks. Enter this database in A1:D6, including the header row. Entries marked empty must be genuinely empty cells, not the word “empty”, a space or a formula returning empty text.

Row A: ID B: Team C: Amount D: Note
2 101 East 10 ready
3 102 West 40 ready
4 103 East 20 empty
5 104 East 30 hold
6 105 North 0 ready

These are fictional records. Amount is deliberately numeric, including a genuine zero. Note provides a separate text/blank field for count comparisons. Headers are unique and consistent.

Build these separate criteria blocks; none overlaps A1:D6:

Purpose Exact entries Range
East only Q1 Team; Q2 East Q1:Q2
East AND amount at least 20 F1 Team; G1 Amount; F2 East; G2 >=20 F1:G2
East OR West I1 Team; I2 East; I3 West I1:I3
No matching team K1 Team; K2 South K1:K2
All records M1 Team; M2 genuinely empty M1:M2
Unique ID 103 O1 ID; O2 numeric 103 O1:O2
Unique ID 105 S1 ID; S2 numeric 105 S1:S2

Enter >=20 as criterion text, not a formula. Place result formulas in U2:U15, outside every data/criteria block. The extra spaces used in this explanation are not part of the header text.

Reconstruct the population calculation

The selected East mean is 20, and the squared deviations 100,0,100 sum to 200. Population variance is 200/3; population standard deviation is √(200/3). The divisor is 3, not 2.

For an independent calculation area, enter 10,20,30 in W2:W4. Put =AVERAGE(W2:W4) in Y2, square each deviation in X2:X4 using =(W2-$Y$2)^2, then use =SQRT(SUM(X2:X4)/COUNT(W2:W4)). Its target is 8.16496580927726. The result measures spread in the same units as the input values.

Worked selections

Formula Target
=DSTDEVP(A1:D6,"Amount",Q1:Q2) 8.16496580927726
=DSTDEVP(A1:D6,3,F1:G2) 5
=DSTDEVP(A1:D6,"Amount",I1:I3) 11.1803398874989
=DSTDEVP(A1:D6,"Amount",M1:M2) 14.142135623731
=DSTDEVP(A1:D6,"Amount",O1:O2) 0

The two-value AND subset 20,30 has squared-deviation sum 50, so √(50/2)=5. East/West has sum 500 and n=4, giving √125. All records have sum 1000 and n=5, giving √200. A population consisting of the single selected value 20 has zero spread.

Advanced: interpret the population boundary

Population here means the complete population relevant to your question, not “a large data set”. Three values can be a complete population of three observations; thousands can still be a sample. If the selected records are used to estimate a broader population, compare DSTDEV rather than choosing the smaller result because it looks preferable.

For the East subset, the sample result 10 differs from 8.16496580927726 by the factor √(3/2). Squaring DSTDEVP’s mathematical result gives DVARP’s target 66.6666666666667. Standard deviation is in original units; variance is in squared units. Neither measures mean direction or establishes causation.

Typed values and empty selections

This implementation requests typed selected values, includes numeric elements and explicitly propagates error elements in its aggregation loop. That differs from DSTDEV’s raw numeric parsing. Do not assume the two routines have identical mixed-type behavior simply because one is the population counterpart of the other.

A recognized criterion with no matching South record is source-predicted #DIV/0!. A matching record with an empty selected Note is also blocked by the helper’s empty-result error. A genuinely numeric singleton has the valid mathematical result 0, distinct from sample-standard-deviation singleton behavior in the inspected revision.

Keep numeric-looking text out of the main Amount column. The worked examples use stored numbers, not labels that happen to display digits. The function cannot decide whether a zero is an actual observation or a missing-data code; classify it correctly before applying the criterion.

Criteria logic and important ONLYOFFICE source limits

Conditions in one criteria row are combined with AND; separate rows supply OR alternatives. The first main OR row above matches East, and the second matches West. A record matching both alternatives is collected once in the inspected helper.

A blank criterion means no restriction for that column in the checked source. Thus M1:M2 selects all records; it is not a request to find blank Team cells. An accidental blank OR row can similarly broaden the selection. Keep the criteria rectangle tight rather than including unused rows for convenience.

Bare text is another trap: the helper appends a wildcard to a text criterion without an operator. East can therefore match a longer prefix such as Eastside. This database contains no such team, so the main results are unambiguous. To request explicit equality in a future test, store =East as text, for example by typing a leading apostrophe before it; do not accidentally enter it as a formula. Wildcard, case and locale edge behavior needs its own bounded validation.

There is also a version-specific OR caveat. The inspected helper can return early when the first recognized criteria row has no matches, before considering later OR rows. Do not promise order-independent OR behavior from this implementation. Reversing a deliberately unmatched first row and a matching second row is a separate source-predicted regression probe, not a native test performed here.

Unknown criterion headers are not a safe way to request “no match”: the helper skips unrecognized headers and, if none are recognized, can select every record. Copy valid headers exactly and distinguish a misspelled criterion heading from an unknown selected field. These observations come from the shared source helper, not from applying another product’s database-function rules.

DPRODUCT, DSTDEV, DVAR, DVARP provide related database aggregations. DAVERAGE describes the selected mean, DCOUNT helps audit clean numeric counts, and DSUM adds selected values.

Availability, compatibility and verification

The function is currently documented in ONLYOFFICE’s unversioned Spreadsheet Editor help. Its first introduction release/date, final supported version and any retirement announcement are not established by these sources. Documentation presence does not establish support in every older Desktop Editors build, Docs deployment or mobile client.

This guide checks official SDKJS tag v10.0.0.169, commit 3679e0375a758d7dc59d31337a45461be3525ed8, alongside current help on October 18, 2026. Main arithmetic is independently calculated; implementation-specific branches are labeled source-predicted. No ONLYOFFICE engine or application was executed for these examples. No native screenshots or recalculated workbook are claimed.

Formulas use English names and comma separators. Adapt separators to the actual editor locale. Similar function names elsewhere do not guarantee identical criteria matching, text coercion, errors or blank-field handling. Keep the database header in the formula range and preserve genuinely empty cells when transferring the example.

References checked October 18, 2026