---
schema_version: "1"
id: 742b00caf9ce6f5c15ef5521ef17919ad18ff691caeab3a7b0ee3a7b0e89ca28
title: Create a Rate Look-Back Rule
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_rules_look_back.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_rules_look_back.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f75974d56e6ed487e42629f6ac0b18c903cb006de8d768a0e972397960ab2983
description: Pay commissions months or years after the date when attainment is retired by looking back to see the rate a rep achieved for a deal.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Create a Rate Look-Back Rule

Pay commissions months or years after the date when attainment is retired by looking back to see the rate a rep achieved for a deal.

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

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d93262e77 ">
              <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 filter, ByRepPaymentInPeriod, and assign it to a datasheet.
    
    Typically, the rule is based on the date that commission is paid, such as an InvoiceDate or PaymentReceivedDate.
    
    ```
    ByRep AND PaidInPeriod AND ClosedWon
    ```
    
    ![Filter for look back rule](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_rules_look_back_filter.png)
2. Add a field to the datasheet and create a marginal percent calculation, `mpercent()`, that returns the commission rate to apply.
    
    ```
    =mpercent(ARR, MarginalPayoutRateTable, PriorAccumulationFromCloseDate)
    ```
3. Create a prior accumulation calculation that uses the `let()` function.
    
    ```
    =let(ThisCloseDate, CloseDate, let(ThisDealId, Id, sumif(ClosedByRepInPast2Years, date_between?(CloseDate, beginning_of_fiscal_year(ThisCloseDate), ThisCloseDate)  AND if(CloseDate = ThisCloseDate, ThisDealId > Id, true), ARR)))
    ```
    
    This calculation references these values.
    
    - The `ClosedByRepInPast2Years` filter goes back only two years because we don't expect payments to be received more than a year after the CloseDate. You can adjust the timeframe, but start with the smallest filter timeframe possible.
    - The `CloseDate` section narrows the results down to only the CloseDates that occur from the beginning of the year to the row that’s being calculated.
    - The `if` function section finds any rows with the same close date as the row being calculated and orders them by DealId.
    - The `let` function structure means you don’t have to subtract the current row's ARR because it's already being excluded from the accumulation.
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/images/icon_tip.png)
    
    Tip Turn off trace in the settings of this calculation.
4. Finish the rule calculation. The basic commission calculation is the ARR multiplied by the rate, which can change depending on what month or year the rate applies to.
    
    ```
    =ARR * RateAtCloseDate
    ```
5. Optionally, if your tier table is based on attainment percentages, divide the previous AccumulationFromCloseDate by the quota from the correct year.
    
    ```
    =sum(quotas(rep, "Quota", beginning_of_fiscal_year(CloseDate), end_of_fiscal_year(CloseDate)), amount)
    ```