Links

Return Null/Empty Values in Formulas

Learn how to return a null (or empty) value from a Notion formula.
Unlike JavaScript, Notion formulas do not have a null data type. However, it is possible to make a formula return a null/empty value using some easy workarounds.
To return a null/empty string, use a pair of double quotes "":
1
""
To return a null/empty number, use the following formula (credit to aNotioneer on Twitter for this number workaround):
1
toNumber("")
Likewise, you can return a null/empty date object using this formula:
1
fromTimestamp(toNumber(""))
There is no possible null/empty state for Booleans/Checkboxes. However, you can convert Booleans to strings with format in order to create a setup where true/false/empty is possible:
1
// Assume "Checkbox" is a Boolean/Checkbox property.
2
3
// Invalid; will throw a Type Mismatch error:
4
if( 1 > 2, prop("Checkbox"), "")
5
6
// Valid. Will output "true", "false", or an empty value.
7
if( 1 > 2, format(prop("Checkbox")), "")

Example Database

This example database demonstrates how outputting null/empty values from several formulas allows us to calculate a per-genre average rating inside a Movies database.

View and Duplicate Database

About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.