---
schema_version: "1"
id: 9b89e2c20ad29952c7490593fd685ba43c91a1c4bd68ddb00edef460fc92f646
title: MDP 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/mcidp_measure_aggreg.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mcidp_measure_aggreg.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: eaf39a5dfcfa1229129dd468fe41e7e443cb3a4fb62929ba19fae5957177fe4b
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 MDP, you define the aggregation function when creating a calculated measurement.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# MDP 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 MDP, 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.