Docs Menu
Docs Home
/
Atlas Charts
/ /

Aggregation Options

On this page

  • Numbers
  • Strings and Dates

Dragging a field onto an aggregation encoding channel allows you to use an aggregation pipeline operator on that field.

The aggregation pipeline operators available in the chart builder change based on the data type of the selected field. Atlas Charts categorizes the field data type as either a number, string, or date and displays appropriate aggregation options accordingly.

The following tables list the available aggregation options for each data type:

Aggregation Option
Description
Pipeline Operation
sum
Sums all values in the field.
count
Counts the number of documents with a value in the field.
count by value
Counts the number of distinct values in the field and creates a series based on the values.
distinct
Counts the number of unique values in the field.
Applies $addToSet and counts the number of items in the result set with $size.
mean
Averages all values in the field.
median

Approximates the median value in the field.

To use this aggegation option, your deployment must use MongoDB 7.0 or later.

min
Returns the minimum value in the field.
max
Returns the minimum value in the field.
variance
Calculates the sample variance of values in the field.
Applies $stdDevSamp and raises the result to the 2nd power with $pow.
variance population
Calculates the population variance of values in the field.
Applies $stdDevPop and raises the result to the 2nd power with $pow.
standard deviation
Calculates the sample standard deviation of values in the field.
standard deviation population
Calculates the population standard deviation of values in the field.
Aggregation Option
Description
Pipeline Operation
count
Counts the number of documents with a value in the field.
count by value
Counts the number of distinct values in the field and creates a series based on the values.
distinct
Counts the number of unique values in the field.
Applies the $addToSet operator and counts the number of items in the result set with $size.

Back

Understand Encoding Channels