Aggregates

Instead of requiring users to write manual calculations every time, you can define a set of aggregations directly within your View YAML. This allows stakeholders to choose from multiple summary options—like sum, average, or count—with just a click.

Loading code...

Here’s a quick reference of all the aggregate options you can use, with explanations for each one.

OptionDescription
countReturns the total number of rows (including duplicates and non-nulls)
countdistinctReturns the number of unique non-null values
sumReturns the total sum of numeric values
avgReturns the average (mean) of numeric values
medianReturns the median (50th percentile) of numeric values
modeReturns the most frequently occurring value
maxReturns the maximum value
minReturns the minimum value
stddevpopReturns the population standard deviation
stddevsampReturns the sample standard deviation
varpopReturns the population variance
varsampReturns the sample variance
nullNo function is applied

In the canvas UI, aggregate options are revealed by clicking on the expandable field.