Loading

Remove #Error! values from Custom Summary Formulas in Reports

Data pubblicazione: May 14, 2026
Descrizione

In Salesforce Reports, Custom Summary Formulas may display #Error! in report cells when the formula attempts to divide a value by a zero denominator. This commonly occurs with currency fields, which store a value of 0.00 even when displayed as blank on a record or report.
Note: Currency fields, although displayed as blank on the record and report, always enter a 0.00 value in any formula.

Risoluzione

To remove #Error! values from a Salesforce Custom Summary Formula, add an IF statement that checks the value of the denominator before performing division.

Fix #Error! Values with an IF Statement

Add an IF statement that checks the value of the denominator.
Example: For the formula: SampleField__c:SUM / SampleField2__c:SUM
Write instead: IF(SampleField2__c:SUM = 0, SampleField__c:SUM, SampleField__c:SUM / SampleField2__c:SUM)
This formula returns the numerator value when the denominator is zero, preventing the #Error! result.

IF Statement Considerations

  • Adding IF statements to a report may affect report performance.
  • The Grand Total of the report may differ from the sum of individual row values when the formula contains an IF statement.

Example: For the formula: IF(CLOSED:SUM = 0, 0, AMOUNT.CONVERT:SUM/CLOSED:SUM)
The grand total evaluates the formula at the summary level — it calculates AMOUNT.CONVERT:SUM / CLOSED:SUM across all records, not as a sum of the individual group results.
Additional Notes:

  • Smart Totaling can be another reason the grand total differs from the sum of records.
  • The same cause may return a "java.lang.ArithmeticException: Division undefined" error message when customizing a report.
  • When an IF statement is used with the UNIQUE function in a report formula, the values may be inconsistent even if the formula validates successfully.
Numero articolo Knowledge

000384796

 
Caricamento
Salesforce Help | Article