Loading

Why Report Custom Summary Formula 'Subtotal' or 'Grand Total' Has Unexpected Results

Дата публикации: Jun 18, 2026
Описание

When using multiplication or division within Custom Summary Formulas (CSFs) in Salesforce Reports, the values displayed in the Subtotal or Grand Total rows may differ from what you expect based on the individual row-level formula results.

A Custom Summary Formula is evaluated at each report grouping level, including detail rows, subtotals, and grand totals. Because of this, the calculation logic used for subtotal and grand total rows differs from the logic applied to individual records.

Решение

Why Custom Summary Formula Subtotals Produce Unexpected Results

Unlike standard report column subtotals, which are calculated by summing the individual row values, Custom Summary Formulas recalculate the formula at each grouping level using the summed values of the contributing fields.

For example, if the formula is:

Column A × Column B

Record NameColumn AColumn BFormula Result
Record 1236
Record 24312
Record 3428
Subtotal10880

Many users expect the subtotal value to be:

6 + 12 + 8 = 26

However, Salesforce evaluates the subtotal by applying the formula to the aggregated column values:

(2 + 4 + 4) × (3 + 3 + 2) = 10 × 8 = 80

Therefore, the subtotal displays 80 instead of 26.

Real-life example

A sales manager creates a report with a Custom Summary Formula of Units Sold × Price Per Unit to calculate revenue. While the formula correctly calculates revenue for each individual record, the Grand Total row does not display the sum of those revenues. Instead, Salesforce multiplies the total units sold by the total price values, which can result in a much larger and unexpected number.


Important: This Is Expected Product Behavior

This behavior is expected and is the current design of Salesforce Reports. Custom Summary Formulas are evaluated using aggregated field values at each grouping level rather than summing the results of the formula from individual rows.

If you need the subtotal or grand total to represent the sum of individual formula results (26 in the example above), consider using a row-level formula field, a custom formula field on the object, or restructuring the report to achieve the desired calculation.

To request a change to this behavior, visit the Salesforce Idea Exchange and vote for:

Fix Reports Grand Total Calculation Error

 

Номер статьи базы знаний

000387323

 
Загрузка
Salesforce Help | Article