---
schema_version: "1"
id: 7cbf3f1ae6c1386f13c742b2d2f87414714019f981729d997a374207e82f8a31
title: amounts_from
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_amounts_from.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_amounts_from.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2b02f90fa5e4e97a01827c57a5dca2c84ac100e0f2c6b463aa2617bea432ed67
description: 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.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# amounts\_from

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.

### 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>

## Syntax

```
amounts_from(start_date, end_date, plan_name, payout_rule_name, user_id)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| start\_date | Required | The beginning of the date range to calculate amounts for. This argument supports any date functions. |
| end\_date | Required | The end of the date range to calculate amounts for. This argument supports any date functions, such as `days_ago()`, which returns the last day before the current statement period. |
| plan\_name | Required | The name of the plan that includes the amounts to return. Enclose the plan name in double quotes, or use the `plan.name` reference. |
| payout\_rule\_name | Optional | The name of a specific payout rule to return amounts for. Enclose the rule name in double quotes. If you omit this argument, the function returns the total commission amounts. |
| user\_id | Optional | The name of a specific user on the statement to return amounts for. |

## Considerations

- This function can't reference the value of a calculated field.
- This function supports only previous statement periods, not the current statement period.
- This function doesn't account for adjustments. To include adjustments, create adjustment rules.
- This function returns the amounts from the most recently calculated statements. If you modify a calculation in Designer and change commission amounts, recalculate all affected statements in chronological order.
- Calculate statements in chronological order.
- To make sure that previous amounts don't change, freeze previous statements in chronological order as they're finalized and approved. If statement or rule amounts change in a previous period, those changes aren't rolled forward to future statements. Recalculate each subsequent statement in chronological order.
- To calculate quarter-to-date or year-to-date amounts, it's more efficient to add multiple statement amounts than to recalculate previous commission amounts.
- If a statement is missing, Spiff assigns a $0 commission amount by default. If a rep is paid in a currency other than USD, avoid mismatch errors by saving separate calculations for each period, converting amounts to the rep's currency, and summing the amounts.

## Example

Return the amounts from the beginning of the year in the rep's preferred currency.

```
=currency(amounts_from(BeginningOfYear, PreviousPeriod, PlanName), RepPreferredCurrency)
```

#### See Also

- [currency](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_currency.htm&release=264.0.0&type=5 "Converts a number of string into a specified currency in Salesforce Spiff.")