---
schema_version: "1"
id: aeefacd801c457052d5240724584f1dd5a5b70b62a02ef7e4b2510fc1109036f
title: Use a Summary Function in a Custom Summary Formula
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/reports_summary_functions_using.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.reports_summary_functions_using.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d6ca0978125b0bcd8ae4270d77e2304ddd16ac0d5e48f2eed361b15f8d28e911
description: "Summary functions let you use grouping values in custom summary formulas for summary, matrix, and joined reports. There are two summary functions: PARENTGROUPVAL and PREVGROUPVAL."
products:
  - Cross Cloud
release: "264"
---
# Use a Summary Function in a Custom Summary Formula

Summary functions let you use grouping values in custom summary formulas for summary, matrix, and joined reports. There are two summary functions: `PARENTGROUPVAL` and `PREVGROUPVAL`.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Enhanced Folder Sharing and Legacy Folder Sharing</td></tr></tbody></table>

<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="vertical-align:top;" id="d41918e95">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d41918e95 ">To create, edit, and delete reports:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d41918e95 ">
              <dl>

                <dt style="font-weight:bold;padding-top:.25rem;">Legacy Folder Sharing</dt>

                <dd style="padding-left:1.5rem;padding-bottom:.5rem;">Create and Customize Reports <p>AND</p>
                  <p style="margin-bottom:0;">Report Builder</p>
                </dd>


                <dt style="font-weight:bold;padding-top:.25rem;">Enhanced Folder Sharing</dt>

                <dd style="padding-left:1.5rem;padding-bottom:.5rem;">Create and Customize Reports <p>AND</p>
                  <p style="margin-bottom:0;">Report Builder</p>
                </dd>

              </dl>
            </td>

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

1. Double-click **Add Formula** in the Fields pane.
2. In the Custom Summary Formula dialog, under Functions, select Summary.
3. Select `PARENTGROUPVAL` or `PREVGROUPVAL`.
4. Select the grouping level and click **Insert**.
5. Define the formula, including where to display the formula.
6. Click **OK**.

#### See Also

- [Evaluate Groups and Totals with Summary Formulas](https://help.salesforce.com/s/articleView?id=analytics.reports_builder_fields_formulas.htm&release=264.0.0&type=5 "Write summary formulas to evaluate a report's group subtotals and grand totals. For example, summary formulas can adjust earnings after tax.")
- [PARENTGROUPVAL and PREVGROUPVAL](https://help.salesforce.com/s/articleView?id=analytics.reports_summary_functions_about.htm&release=264.0.0&type=5 "Use PARENTGROUPVAL to calculate values relative to a parent grouping. Use PREVGROUPVAL to calculate values relative to a peer grouping.")