 Computes the variance among all values in a column using the sample statistical method. Input column can be of Integer or Decimal. If no numeric values are detected in the input column, the function returns `0`.

The variance of a set of values attempts to measure the spread in values around the mean. A variance of zero means that all values are the same, and a small variance means that the values are closely bunched together. A high value for variance indicates that the numbers are spread out widely. Variance is always a positive value.

If a row contains a missing or null value, it is not factored into the calculation.

 NOTE: This function applies to a sample of the entire population. More information is below. • This function is calculated across a sample of all values.

• For more information on a population version of this function, see VAR Function.

In the following computation, the sample method computes variances with N - 1 as the divisor.

Var(X) = [Sum ((X - mean(X))2)] / (Count(X) - 1)

The square root of variance is standard deviation, which is used to measure variance under the assumption of a bell curve distribution. See STDEV Function.

For a version of this function computed over a rolling window of rows, see ROLLINGVAR Function.  varsamp(myRating)

Output: Returns the variance of the group of values from the `myRating` column using the sample method of calculation. varsamp(col_ref) [group:group_col_ref] [limit:limit_count]

ArgumentRequired?Data TypeDescription
function_col_refYstringName of column to which to apply the function

For more information on the `group` and `limit` parameters, see Pivot Transform. ### col_ref

Name of the column whose values you wish to use in the calculation. Column must be a numeric (Integer or Decimal) type.

• Literal values are not supported as inputs.
• Multiple columns and wildcards are not supported. Required?Data TypeExample Value
YesString (column reference)`myValues`   