Get AI summaries of any video or article — Sign up free
Notion Office Hours: Formulas 101 đź§® thumbnail

Notion Office Hours: Formulas 101 đź§®

Notion·
5 min read

Based on Notion's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

A formula property computes values automatically per database item by running the same formula across rows.

Briefing

Notion formulas turn database fields into automatically calculated values—so instead of manually typing results for every row, users define logic once and let Notion compute it item by item. The session frames formulas as a practical tool for two big jobs: calculating new values from existing properties (like full names, ages, taxes, totals) and reformatting values into more useful, readable forms (like labeling an age as “Age: 34” or formatting order dates for a gallery view). That matters because it reduces repetitive work while making databases easier to scan and act on.

The walkthrough begins with the core concept of a “formula property.” Unlike text, date, or number properties where values are entered directly, a formula property generates a unique output for each database item by running the same formula across the database. The presenter demonstrates creation of a formula property, starting with a simple literal expression (2 + 2) to show that literal values produce the same result for every row. From there, the session quickly moves into why formulas are worth the effort: merging first and last names, computing age from a birthdate using the now() function, calculating tax from a tax rate and price, and building totals by combining computed fields.

To make formulas less mysterious, the session breaks them into a hierarchy of parts. At the highest level, a formula answers what action to take and on what input values to take it. Actions come from two places: operators (like +, -, *, /, %), and functions (like add(), concat(), join(), dateBetween(), formatDate()). A key detail is that the same symbol can behave differently depending on value types—for example, + adds numbers but concatenates text strings. Functions are treated as packaged operations: a keyword followed by parentheses, with arguments separated by commas.

The session then drills into input value types, because they determine whether an expression works and what it returns. Notion formulas primarily deal with numbers (including decimals), strings (text), dates (including now()), and booleans (true/false, which render as checked/unchecked checkboxes). Conversions become essential when mixing types—such as turning a number into text so it can be concatenated into a label. The presenter uses format() to convert numbers to strings and toNumber() to convert numeric text back into a number.

Practical examples tie everything together using two sample databases: a basketball roster and an e-commerce orders table. In the roster, formulas generate full names via concat() or join(), compute age using dateBetween(now(), birthday, "years"), and create a labeled age by converting the age number into text before concatenation. In the orders database, formulas generate a unique line-item ID by joining order number and product SKU with a dash (formatting the order number as text first), compute tax with multiply(price, taxRate), compute total cost by adding price and tax, and calculate fulfillment timing using dateBetween(now(), orderDate, "days"). Date formatting is highlighted as especially powerful: formatDate() plus pattern strings can produce custom month/day/year and time-zone-aware outputs for display.

The Q&A adds important boundaries. Formulas can only control the output of the formula property itself (including true/false checkboxes), not other property types like Select or Status, and they can’t directly automate changes in related properties. Questions also point toward future sessions on conditional logic (Formulas 201), decimal rounding, and replicating spreadsheet functions like VLOOKUP using relations and rollups.

Cornell Notes

Notion formulas are defined once in a formula property, then run across every database item to produce row-specific results. They’re mainly used to (1) calculate new values from existing properties—such as full names, ages, tax, totals—and (2) reformat values for better display, like labeling numbers or customizing date formats. Formulas are built from operators and functions, and they depend heavily on value types: numbers, strings, dates, and booleans. When types don’t match (e.g., concatenating a number with text), conversion functions like format() and toNumber() are required. The session also emphasizes date formatting with formatDate() and pattern strings, plus timing calculations with dateBetween() and now().

What makes a Notion “formula property” different from other property types?

A formula property automatically generates its value for each database item by executing the same formula across the database. Unlike text/date/number properties where values are manually entered per row, formulas compute results using defined operations and inputs (often via property references). Literal values (like 2 + 2) produce the same output for every item, while property references (like price or birthday) produce different outputs per row.

How do operators and functions differ in Notion formulas?

Operators are symbols that perform actions between values—e.g., +, -, *, /, %. The same operator can behave differently based on value types: + adds numbers but concatenates text strings. Functions are keyword-based operations with parentheses and comma-separated arguments (inputs). For example, add(2, 2) returns the same result as 2 + 2, but it uses the add() function instead of the operator.

Why do value types matter so much in formulas?

Every operator and function expects specific value types. Notion’s main types in formulas are numbers, strings, dates, and booleans. If types don’t match, formulas error or produce unintended results. A common fix is conversion: format(number) converts a number to a string for concatenation, while toNumber(string) converts numeric text into a number.

How are ages and time intervals calculated in the examples?

Age uses dateBetween(now(), prop("birthday"), "years"). The now() function provides the current date/time without arguments. dateBetween() then computes the difference between two dates, with the unit specified as a text string like "years" or "days".

How can dates be reformatted into custom display formats?

Use formatDate(dateValue, patternString). The second argument is a pattern string built from tokens (year, month, day, time, am/pm, milliseconds, time zones, etc.). In the session, order dates are reformatted using patterns that control month abbreviation style, punctuation, and a shortened year format.

What are the limits of formulas regarding other properties and automation?

Formulas can only control the output of the formula property itself. They can return true/false (rendering as checkboxes), but they can’t directly output other property types like Select/Status or trigger updates to other properties. For automation across related data, relation properties and rollups are the suggested path rather than trying to force formulas to write into other fields.

Review Questions

  1. Write a formula property expression to generate a labeled number like “Age: 34” from a numeric age property, using the correct conversion step.
  2. Explain how + can produce different results in Notion formulas depending on whether the operands are numbers or strings.
  3. How would you compute “days since order” using dateBetween() and now()?

Key Points

  1. 1

    A formula property computes values automatically per database item by running the same formula across rows.

  2. 2

    Formulas primarily serve two purposes: calculating new values from other properties and reformatting existing values for clearer display.

  3. 3

    Operators and functions both define actions, but operators use symbols while functions use keyword + parentheses + arguments.

  4. 4

    Value types (number, string, date, boolean) determine whether expressions work and what they return; conversions are often required.

  5. 5

    Use format() to convert numbers to strings for concatenation and toNumber() to convert numeric strings back into numbers.

  6. 6

    Use dateBetween(now(), dateProperty, "years"|"days") for age and elapsed-time calculations.

  7. 7

    Use formatDate(dateValue, patternString) to customize date display with pattern tokens.

Highlights

A single formula property can replace repetitive manual work by generating row-specific results from other properties.
The same + symbol can add numbers or concatenate text strings, depending on operand types.
formatDate() with pattern strings unlocks highly customized date formatting beyond the default date property display.
Formulas can’t directly write into other property types (like Select/Status); they only control the formula property’s own output.

Topics

Mentioned