Loading

'Blank Field Handling' Section on a Salesforce Formula Field

Publish Date: Jul 29, 2025
Description

For custom formula fields, there is a Blank Field Handling section.

In Lightning, this section is accessible when you select Setup| Object Manager | [object] | Fields and Formulas.   Object Manager is next to the Home tab in Lightning after selecting Setup.

Click Edit on the formula field and select the Advanced tab.  The Blank Field Handling option is used if your formula references any number, currency, or percent fields. You can specify what happens to the formula output when their values are blank.

The two options under the Advanced tab are:

  • Treat blank fields as zeroes
  • Treat blank fields as blanks
    Screenshot 2024-11-01 at 10.11.13 AM.png 


To give any blank fields a zero value, choose Treat blank fields as zeros. To leave these fields blank, choose Treat blank fields as blanks.

Resolution

Scenario
One possible scenario where the Blank Field Handling might be configured incorrectly is if you notice the formula field displaying blank values when you need it to calculate a value.

Example:

  • You have 2 custom fields: Percentage A and Percentage B.
  • You created a formula field that calculates the difference between the two custom fields (Percentage_A__c - Percentage_B__c).
  • For record #12345, the Percentage A field has a value of '1.0' and the Percentage B field has a value of nothing/blank(null).


From your calculations, when you subtract the two fields above, '1.0' - blank(null) value = '1.0'. The result in this formula field on record will display a value differently based on how you configure the Blank Field Handling section.

 

From the example above, here are your two outcomes depending on your selection of Blank Field Handling:

  • Outcome 1: When Treat blank fields as zeroes is selected, your formula will calculate '1.0' and display this on the record.
  • Outcome 2: When Treat blank fields as blanks is selected, your formula will calculate nothing because they are treating blank fields as blanks. Salesforce will not produce a value if part of the formula criteria references a blank value. You will notice nothing has been populated on the record.


To avoid blank values resulting for formula calculations, it is recommended to select Treat blank fields as zeroes to always display a value for a formula field but this is completely dependent on your business needs.

Knowledge Article Number

000381641

 
Loading
Salesforce Help | Article