---
schema_version: "1"
id: ad7f6dddb0440dc10588d3864768d998bf8212ce0be5bc8bdda78a098b2e9982
title: Create a Year-to-Date Commission Calculation 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_ytd_commission.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_ytd_commission.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6a9f83f40a066234cd3a5b09a0a7cf9c8de756d83af5e35d34d0635e91f4b51a
description: Create a calculation that generates a report on the year-to-date (YTD) commission default metric card in a Salesforce Spiff custom report. You can also use this calculation to show the fiscal year YTD commissions as a metric card.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Create a Year-to-Date Commission Calculation in Salesforce Spiff

Create a calculation that generates a report on the year-to-date (YTD) commission default metric card in a Salesforce Spiff custom report. You can also use this calculation to show the fiscal year YTD commissions as a metric card.

### 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="d99853e76">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d99853e76 ">To create worksheet calculations:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d99853e76 ">
              <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 a worksheet calculation, YTDCommissionsUpToPreviousPeriod, that calculates the full year except for the current statement period.
    
    ```
    =amounts_from(beginning_of_year(BeginningOfPeriod), days_ago(BeginningOfPeriod, 1), plan_name)
    ```
2. To identify the calculation from each payout amount on the plan, go to the Plans page, hover over each active payout rule, and identify the calculation name.
3. To open the worksheet or datasheet with the calculation, click the payout value.
4. Create a CurrentPeriodCommission calculation for the amount for the current statement period.
    - For a datasheet, create a `sum()` calculation that aggregates all payouts from each deal.
    - For a worksheet, you can reference the existing calculation.
5. Create the YTDCommission calculation by combining the YTDCommissionsUpToPreviousPeriod and CurrentPeriodCommission calculations.

#### See Also

- [amounts\_from](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_amounts_from.htm&release=264.0.0&type=5 "Returns a sum of commission amounts for specific payout rules or total commission amounts from previous statement periods in Salesforce Spiff. This function is similar to amount_from() but requires a date range instead of a specific date.")