Print this page

Blank Field Handling section on a formula field

Knowledge Article Number 000233669

For custom formula fields, there is a Blank Field Handling section. This section is accessible when you click Edit on the formula field within Setup and 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 are:

  • Treat blank fields as zeroes
  • Treat blank fields as blanks

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.

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

-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 not notice nothing 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.

See Also:
Building Formulas
Formula Operators and Functions I–Z

promote demote