Skip to main content

freq

freq(<bool-expression>)

Returns a count of all records where the input expression returns true.

If the input expression returns null for a record, that record is excluded from the calculation.

Examples:

freq(q1==1)
freq(q1 in (8,9,10))
freq(country=="USA")
freq(country=="USA" and gender==1)

The return value is structured as follows:

{
val: 127, // return value (frequency)
n: 994 // number of valid (non-null) cells
}