---
schema_version: "1"
id: 00a34161f37fd3111ec22705ced4980565b24d608bbddab1679828b224225e67
title: "Aggregate Node: Roll Up Data to a Higher Level"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_recipe_aggregate_rows.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_aggregate_rows.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8d189e1d72e0e10a0a018dec1a467e12448d93f42315b9528b157fcf003f6725
description: "Use an Aggregate node to roll up data to a higher granularity in CRM Analytics. You can aggregate using: unique, sum, average, count, maximum, and minimum. You can group by any dimension or date column. You can also pivot dimensions as columns. For example, you can group opportunities by account to get account-level details, like total opportunity amount, average number of cases, and the average days to close an opportunity for each account. You can then pivot on account type to analyze each combination of account and account type."
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Aggregate Node: Roll Up Data to a Higher Level

Use an Aggregate node to roll up data to a higher granularity in CRM Analytics. You can aggregate using: unique, sum, average, count, maximum, and minimum. You can group by any dimension or date column. You can also pivot dimensions as columns. For example, you can group opportunities by account to get account-level details, like total opportunity amount, average number of cases, and the average days to close an opportunity for each account. You can then pivot on account type to analyze each combination of account and account type.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d44202e38">User Permissions
                Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d44202e38 ">To manage and create a recipe:</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d44202e38 ">Edit CRM Analytics Dataflows OR Edit Dataset Recipes</td>

            </tr>
          </tbody>
        </table>

1. In a Data Prep recipe that already has at least one Input node, select the Add Node button (![Add Node button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_button_add_node.png)) between two nodes or at the end of the recipe. To show the Add Node button between two nodes, hover the cursor on the connecting line.
2. In the Add Node dialog box, select **Aggregate**.
    
    ![The Add Node modal shows all possible nodes that you can add, including the Aggregate node.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_recipe_node_aggregate.png)
3. Add at least one aggregate.
    
    Before you can add a grouping, add an aggregate. You can select one of the following aggregate functions.
    
     
    | Aggregate Function | Description |
    | --- | --- |
    | Unique | Counts only unique values in the selected column. |
    | Sum | Calculates the total by adding all values in the selected column. |
    | Average | Calculates the average value of the selected column. |
    | Count | Counts all values in the selected column. |
    | Maximum | Calculates the maximum value of the selected column. |
    | Minimum | Calculates the minimum value of the selected column. |
    | Stddevp | Calculates the population standard deviation. Population standard deviation measures the spread of data distribution—the typical distance between each data point and the average. |
    | Stddev | Calculates the sample standard deviation. Sample standard deviation measures the spread of data distribution for a given sample. Use sample standard deviation to estimate the population standard deviation based on a sample. |
    | Varp | Calculates the population variance. Population variance indicates how spread out data points are in a specific population. |
    | Var | Calculates the sample variance. Sample variance indicates how spread out data points are for a given sample. Use sample variance to estimate the population variance based on a sample. |
    
    ![The aggregate functions appear in the Select Aggregate dialog box.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_recipe_node_aggregateFunctions.png)
4. To group rows, add one or more dimension or date columns in the Group Rows field.
    
    For example, you can group by account name.
    
    ![The Aggregate node calculates the average opportunity amount for each account.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_nodeAggregate_groupRows.png)
5. To pivot dimensions as columns, add up to two dimension columns in the Group Columns field, select the values for each dimension column, and click **Apply**. For direct datasets and datasets, you can search for all column values. Otherwise, you are limited to preview data. If a value doesn’t appear in the list, adjust your sample size or refine your search. Then, click **Add new value** and enter the value.
    
    For example, you can group columns by opportunity type. Each combination of opportunity type and aggregate appears as a separate column.
    
    ![The Aggregate node calculates the average opportunity amount for each account and pivots the results by opportunity type.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_nodeAggregate_groupColumns.png)
6. To add the Aggregate node to the recipe, click **Apply**.
7. Save the recipe.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note Because pivoting increases the number of columns, keep in mind that the Aggregate node can create up to 5,000 columns. If the node exceeds the maximum, you can reduce the number of columns by changing the aggregates or row and column groupings.

Your values that aren’t picked are automatically included in an Other column when you pivot with the Data Prep aggregate node. For example, you can group columns by opportunity type, select your most important types, and let the rest be grouped as Other.

#### See Also

- [Aggregate Node: Hierarchical Aggregation](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_aggregate_hierarchy.htm&release=264.0.0&type=5 "Use Hierarchical Aggregation in CRM Analytics to sum measures across multilevel data. For example, you can roll up revenues, assets, or liabilities for companies and their subsidiaries. Or, you can roll salesperson data up the management chain to see aggregates by team, region, area, and beyond. Hierarchical Aggregation requires rows with an ID and a parent ID. Many rows can have the same parent ID, or the parent ID can be empty. Some rows can even share an ID, such as a record with multiple parents. You can also use the optional roll up percentage to apply percentage splits to allocate portions to different parents, such as commission among members of the sales team.")