Berserk Docs
Aggregate FunctionsStatistical

varianceif

Calculates the sample variance of values for which the predicate is true.

Syntax

varianceif(val, predicate)

Parameters

Prop

Type

Returns: real

Examples

Example 1

datatable(warrior:string, voyages:long, elite:bool)[
  "Ragnar", 42, true,
  "Bjorn", 31, true,
  "Floki", 12, false,
  "Ivar", 35, true,
  "Harald", 25, false
]
| summarize varianceif(voyages, elite)
varianceif_voyages (real)
31.0

On this page