Create custom summary formulas for summary and matrix reports to calculate additional totals based on the numeric fields available in the report.
Available in: both Salesforce Classic and Lightning Experience
Available in: Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To create, edit, and delete reports:
“Create and Customize Reports”
A formula is an algorithm that derives its value from other fields, expressions, or values. Custom summary formulas can contain 3900 or fewer characters. Custom summary formulas are available for summary, matrix, and joined reports. They can't be shared across multiple reports.
In report builder, click Add Formula in the Fields pane.
Enter a name for your formula as it will appear on the report. The label must be unique. Optionally, enter a description.
From the Format drop-down list, select the appropriate data type for your formula based on the output of your calculation.
From the Decimal Places drop-down, select the number of decimal places to display for currency, number, or percent data types. This setting is ignored for currency fields in multicurrency organizations. Instead, the Decimal Places for your currency setting apply.
If you select None for Decimal Places, the effective values are:
For currency, displays up to 18 digits, with the default decimal-place precision for the currency
For percentages, displays up to 18 digits, with no decimal places
For numbers, displays up to 18 digits, without changing the decimal-place precision
Set the Where will this formula be displayed? option. The formula calculation will be displayed in the report at the level you select. To display the formula calculation at every level, including the Grand Total, select All summary levels.
Build your formula:
Select one of the fields listed in the Summary Fields drop-down list. This field’s value is used in your formula.
Select the kind of summary type to use in your formula. This option is not available for Record Count
The summary value of data in a field or grouping of fields.
The largest value of data in a field or grouping of fields.
The smallest value of data in a field or grouping of fields.
The average of data in a field or grouping of fields.
Click Operators to add operators to your formula.
Select the function category (All, Logical, Math, or Summary), choose the function you want to use in your formula, and click Insert.
Repeat these steps as necessary.
Click Check Syntax to see if your formula contains errors. Errors are highlighted by the cursor.
Click OK. Your formula isn't saved until you save the report.