---
schema_version: "1"
id: 7f27ee25791caf1c761e1eb9104180b908f6d6511d6df4239a3239d3e29113ce
title: Aggregation and Total Aggregation Functions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_measure_aggreg.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_measure_aggreg.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 70862b8bdceb89bd3ff75180af5054526d3e566d04f9aca4c320ae24d6593797
description: An aggregation function computes numerical calculations on data, allowing the query to return summarized information about a given column or result set. You can use an aggregation function to calculate each row at the dimension level or the total value. In Marketing Cloud Intelligence, you define the aggregation function when creating a calculated measurement.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Aggregation and Total Aggregation Functions

An aggregation function computes numerical calculations on data, allowing the query to return summarized information about a given column or result set. You can use an aggregation function to calculate each row at the dimension level or the total value. In Marketing Cloud Intelligence, you define the aggregation function when creating a calculated measurement.

For example, to perform a different calculation per row, such as getting the average value for each dimension while summing all the values in the total row, set the aggregation function to AVG and the total aggregation function to SUM to sum the values in the different rows.

## Use Case

You can use both the aggregated function and the total aggregation function in cases where you have a calculated measurement with a formula that includes a dimension with an aggregation function set to Auto, and the total value in the query for this calculated measurement is zero. The reason there’s no total value is because the total row doesn’t include the formulas’ required dimension for this calculated measurement. To solve this issue and display a total value, you can set a total aggregation function to display a total value based on the value of each row in the query.