OpenBI Docs Buy

VARX.S

The variance of an expression over a table's rows, taken as a sample.

Group: Aggregation. Compatible with DAX.

Syntax

VARX.S ( <table>, <expression> )
ParameterTypeDescription
tableTableThe rows to go through.
expressionExpression
evaluated for each row
The number worked out for each row.

Returns

Number. The variance of the results, taking them as a sample.

Remarks

  • Rows where the expression is blank are left out.
  • Over a single row the result is NaN; over an empty table, BLANK.

Examples

One row only

A sample of one has no variance; the population variance of one value is 0.

EVALUATE
VAR One = DATATABLE ( "Value", INTEGER, { { 2 } } )
RETURN
    ROW ( "Sample", VARX.S ( One, [Value] ), "Population", VARX.P ( One, [Value] ) )
SamplePopulation
NaN0

Eight values as a sample

EVALUATE
ROW ( "Sample variance", VARX.S ( DATATABLE ( "Value", INTEGER, { { 2 }, { 4 }, { 4 }, { 4 }, { 5 }, { 5 }, { 7 }, { 9 } } ), [Value] ) )
Sample variance
4.57142857142857

VARX.P, VAR.S, STDEVX.S.

Last updated · OpenBI Studio 0.3.74