---
schema_version: "1"
id: 9224e2156120f39ddfeab471c69faf19855d975919ea497281a9cba7af175453
title: Sum Team Totals for All Managers in Salesforce Spiff
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_teams_sum_totals.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_teams_sum_totals.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fd7aa31b226ee1dda620e64190c93450166b0a94d1e0c8309e5c2935301492ef
description: Build a calculation that sums team totals for all managers and displays the sum on the manager’s statement.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Sum Team Totals for All Managers in Salesforce Spiff

Build a calculation that sums team totals for all managers and displays the sum on the manager’s statement.

### 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: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</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="text-align:center;vertical-align:top;" id="d31103e80">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d31103e80 ">To create data filters and worksheet calculations:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d31103e80 ">
              <p>A Spiff <a href="https://help.salesforce.com/s/articleView?id=sales.spiff_users_roles_and_permissions.htm&amp;release=264.0.0&amp;type=5" title="Give users the appropriate level of access so they can be successful in Salesforce Spiff, and enforce the principle of least privilege. Assign a default role to each user, or create custom roles with access to specific Spiff functionality.">user role</a> with this permission turned on.</p>
              <p style="margin-bottom:0;">Designer Configuration: Manage</p>
            </td>

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

1. Create an AllUsers data filter on the User object.
    
    ![Creating a data filter on the User object](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_teams_totals_for_managers.png)
2. Create a calculation on the User object that returns one team for each team lead.
    
    ```
    TeamObjectsByUser = choose(1, direct_manager_of(id))
    ```
3. Create a calculation on the User object that returns a string of userIds on a leads team.
    
    ```
    UsersInTeamByLead = iferror(concat([transform_list(users_in_team(TeamObjectsByUser), Id)]), "N/A")
    ```
4. Create a worksheet calculation on users that sums an amount by team.
    
    ```
    SumTeamAmount = sumif(YourDealLevelDataFilter, contains(UsersInTeamByLead, OwnerId), ARR)
    ```
5. Create a worksheet calculation that returns a list of only team lead IDs.
    
    ```
    TeamLeadIds = transform_list(filter(AllUsers, UsersInTeamByLead != "N/A"), Id)
    ```
6. Create a users data filter that returns only team leads.
    
    ```
    TeamLeadsDataFilter = contains(TeamLeadIds, Id)
    ```
7. Create a payout rule with a datasheet by using the team leads data filter.
    
    ![Statement showing a team's totals](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_teams_totals_for_managers_result.png)