# var()

Returns the variance of the values in a field. Accepts measure fields as input but not expressions.

## Example - Calculate the Variance of Deal Amount

```nolang
q = load "DTC_Opportunity_SAMPLE";
q = group q by all;
q = foreach q generate var('Amount') as 'var_Amount';
```

**See Also**

- [varp()](/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-varp.md)
