Notion Formula Cheat Sheet

Notion allows users to create powerful databases and tables, and it supports formula-like calculations within these tables. Here’s a Notion formula cheat sheet:

Basic Formulas

Simple Arithmetic:

  • Use basic arithmetic operators: +, -, *, /.
=Column1 + Column2

Percentage Calculation:

  • Calculate percentages.
=Column1 / Column2 * 100

Concatenation:

  • Combine text from different columns.
=Column1 + " " + Column2

Aggregation Functions

Sum:

  • Sum values in a column.
=sum(Column1)

Average:

  • Calculate the average of values in a column.
=average(Column1)

Minimum/Maximum:

  • Find the minimum or maximum value in a column.
=min(Column1)
=max(Column1)

Conditional Formulas

IF Statement:

  • Create conditional statements.
=if(Column1 > 50, "High", "Low")

Nested IF:

  • Use nested IF statements.
=if(Column1 > 75, "A", if(Column1 > 50, "B", "C"))

Check for Empty Values:

  • Handle empty values.
=if(empty(Column1), "Not Available", Column1)

Date and Time Formulas

Calculate Duration:

  • Find the duration between two dates.
=dateBetween(end(Column1), start(Column1), "days")

Format Date:

  • Change the date format.
=format(DateColumn, "MMM D, YYYY")

Advanced Formulas

Rollup:

  • Use the Rollup function for linked databases.
=rollup(prop("Sub-Table").column("Column1"), sum())

Lookup:

  • Look up values from another database.
=lookup(prop("Related Database").column("Column1"))

RegexMatch:

  • Use Regex matching for pattern recognition.
=regexMatch(Column1, "pattern")

Tips

Referencing Columns:

  • Reference columns using their names or the prop() function.
=Column1 + Column2
=prop("Column1") + prop("Column2")

Handling Date and Time:

  • Use the start() and end() functions for date properties.
=dateBetween(end(Column1), start(Column1), "days")
  • Understanding Rollup and Lookup:
    • Learn how to use Rollup and Lookup functions for advanced calculations.
  • Testing Formulas:
    • Test formulas in a small dataset or use the Preview option to see the results.
  • Explore Notion Documentation:
    • Refer to the official Notion formula documentation for additional functions and examples.

This cheat sheet provides an overview of basic and advanced formulas in Notion. Formulas in Notion are versatile, and their usage may vary based on the specific use case and context.