---
schema_version: "1"
id: e6c4a88c63610bb4b2fc8245d8e7fa59a2d3287b2f4b3c0e33e95235ac93f255
title: amount_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_amount_from.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_amount_from.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3af623a0cd6b6615e7443a9894df8c275883f4850f8b599731cd48f61642829b
description: Returns a commission amount for a specific payout rule or the total commission amount from a previous statement period in Salesforce Spiff. A commission plan that pays year-to-date totals and subtracts previous earnings can use this function to reference and subtract commission amounts.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# amount\_from

Returns a commission amount for a specific payout rule or the total commission amount from a previous statement period in Salesforce Spiff. A commission plan that pays year-to-date totals and subtracts previous earnings can use this function to reference and subtract commission amounts.

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

```
amount_from(date, plan_name, payout_rule_name, user_id)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| date | Required | The statement period to return an amount 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 amount 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 an amount for. Enclose the rule name in double quotes. If you omit this argument, the function returns the total commission amount. |
| user\_id | Optional | The name of a specific user on the statement to return an amount for. This argument often requires a Users object data filter and a `sumif()` function. See the [user ID example](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_amount_from.htm&release=264.0.0&type=5). |

## 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 value from the most recently calculated statement. If you modify a calculation in Designer and change commission amounts, recalculate the statement.
- Calculate statements in chronological order. If this function rolls forward, start calculating from the first statement. Confirm that the statement is correct, and then continue to the next statement. 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, even if statements were previously frozen.

## Example

Return the total commission amount since the end of the previous statement period.

```
=amount_from(days_ago(statement_period.start_date), 1)
```

Return the total commission amount for the Strategic Account Executive plan in the statement period.

```
=amount_from(days_ago(statement_period_date), 1), "Strategic Account Executive")
```

## Example with User ID

Return a specific rep's commission for a New Booking Commissions payout rule from the previous statement period.

First, create an All\_Users data filter on the Users object that returns a list of all reps.

```
Id!=null
```

On the Users object, create a datasheet field, AmountFromPriorMonth, that uses the `amount_from()` function to return the commission amount for every rep from the previous month. Specify `id` for the user\_id argument.

```
=amount_from(days_ago(statement_period.start_date, 1), "Strategic Account Executive", "New Booking Commissions", id)
```

Create a worksheet calculation that returns only the rep's previous commission on the rule. Use the `sumif()` function with the All\_Users data filter you created, a rep's ID, and the AmountFromPriorMonth datasheet field. This function uses the commission amount for every rep from the previous month but returns only a specific user's data.

```
=sumif(All_Users, Id="18DigitUserId", AmountFromPriorMonth)
```

#### See Also

- [days\_ago](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_days_ago.htm&release=264.0.0&type=5 "Returns the date that's a specified number of days before another date in Salesforce Spiff.")