Notion VIP Logo
BulletproofA-to-ZConsultingThe Streamline
0
Subscribe

Notion Stakeholder Series — Intro to Formulas

I help key Notion stakeholders understand the app’s advanced features. After exploring Notion A-to-Z, we convene for a series of live workshops. Through this Notion Stakeholder Series, I'm making those live workshops available to you. Members of Notion A-to-Z also enjoy access to the interactive lesson, including the working demos and practical exercise. If you’ve yet to join, we’d love to have you onboard.

Here’s what you’ll learn:

What’s a Formula?

Add Subtotal and Tax to calculate the Total of each order.
Add Subtotal and Tax to calculate the Total of each order.

Prepare your Sandbox

Hands-on practice is essential to understanding Notion. As we explore Formulas, I’ll encourage you to try many concepts in a practice database: your “sandbox.”

Let’s prepare it:

  1. Create a new page. Make it a database in the Table layout.
  2. Call it “[Your Name]’s Sandbox.” (“William’s Sandbox”)
  3. Give the default items the names “Item A,” “Item B” and “Item C.”
  4. Sort by Name.
William’s Sandbox
William’s Sandbox

Why Formulas?

Calculations

A Formula can perform mathematical calculations on numbers or dates.

Add Subtotal and Tax to calculate each order’s Total.
Add Subtotal and Tax to calculate each order’s Total.

Conditions

Formulas can test other properties for specified conditions, then act according to the result.

Return Tax Rate for the order’s State.
Return Tax Rate for the order’s State.

Extraction

Formulas can extract segments from other properties.

Split the customer’s Full Name into First Name and Last Name properties.
Split the customer’s Full Name into First Name and Last Name properties.

Formatting

Notion offers limited options for formatting numbers and dates. Rollup properties are especially constrained. With Formulas, you can control decimals and specify virtually any date or time format.

Reformat Order Date to MM.DD.YY.
Reformat Order Date to MM.DD.YY.

Concatenation

Formulas can merge the values of other properties.

Generate an Order Summary from the Order ID, Customer Email and reformatted Order Date.
Generate an Order Summary from the Order ID, Customer Email and reformatted Order Date.

The Formula Window

Editing a Formula prompts the Formula Window. It contains three primary sections:

  1. Compose the formula at the top.
  2. The list at the left provides quick access to “ingredients” you may use in your formula, including functions and properties of your database.
  3. With an element in that list highlighted, the bottom-right section offers an explanation.
The Formula Window.
The Formula Window.

Ingredients of a Formula

You’ll compose formulas with two types of “ingredients”: input values and actions to perform on those values.

To calculate each order’s Total, we use the inputs Subtotal and Tax and action Add.
To calculate each order’s Total, we use the inputs Subtotal and Tax and action Add.

Input Values

Data Types

Before diving into input values, let’s take a broader look at data types in Notion databases. Every value in a database, from simple Title and Text properties to specialized Person and Multi-Select properties, is one of four data types:

  1. Number
  2. String (text)
  3. Date
  4. Boolean (true or false)

Each of a formula’s input values is one of those four data types. So is the value returned by the formula.

It’s essential to remain mindful of data types because most actions must be performed on specific data types.

Literal Values

Because the Formula properties use only literal inputs, the returned values are the same for all items of the database.
Because the Formula properties use only literal inputs, the returned values are the same for all items of the database.

Constants

Notion offers a couple of keywords for mathematical constants, including pi and e (the base of the natural logarithm).

Constants pi and e
Constants pi and e

Property References

The Priority Reference property simply reflects Priority.
The Priority Reference property simply reflects Priority.

Actions

You’ll use two methods to define the actions to perform on your input values: operators and functions.

Operators

Arithmetic Operators
Add Subtotal and Tax by placing a + between them.
Add Subtotal and Tax by placing a + between them.
Comparison Operators
Test whether 2 is less than 3
Test whether 2 is less than 3
Concatenation Operator
Order Summary concatenates Order ID, Customer Email and Order Date → MM.DD.YY.
Order Summary concatenates Order ID, Customer Email and Order Date → MM.DD.YY.

Functions

In place of the + operator, we can use the add() function.
In place of the + operator, we can use the add() function.
Anatomy of a Function
add is the keyword. It accepts two arguments, which must be two numbers or text strings. 2 and 3 are supplied as those arguments.
add is the keyword. It accepts two arguments, which must be two numbers or text strings. 2 and 3 are supplied as those arguments.
Types of Functions

I group functions into four categories based on the data types they accept or return.

In our next training, we’ll explore common functions within each category. Here’s an introduction:

Numeric Functions
Text Functions
Merge "William", " " and "Nutt" with concat().
Merge "William", " " and "Nutt" with concat().
Date & Time Functions
The dateAdd() function accepts three arguments: (1) the initial date (the Date property above); (2) the quantity to add (1 above); (3) the unit, supplied as a lowercase, plural text string (”months”).
The dateAdd() function accepts three arguments: (1) the initial date (the Date property above); (2) the quantity to add (1 above); (3) the unit, supplied as a lowercase, plural text string (”months”).
Logic Functions
The largerEq() function tests whether the first argument (6 below) is greater than or equal to the second argument (5 below).
The largerEq() function tests whether the first argument (6 below) is greater than or equal to the second argument (5 below).

Practical Exercise

For this lesson’s practical exercise, the stakeholders created a database of expenses, with properties that employ the lesson’s concepts. The full instructions and final outcome are available to members of Notion A-to-Z.

All-in on
the all-in-one
productivity app.
Subscribe →