How to use 'if status equals' in notion formulas

12/27/2024

The formula block in Notion is a powerful tool that allows you to create custom logic for your tables, making your workspace more dynamic. One of the most commonly used formulas is the "If Status Equals" formula, which helps you display different outputs based on specific conditions. Whether you're tracking project progress or managing inventory, this formula can save you time and make your workspace more intuitive.

Step 1: Add a Formula Block

Before you start writing the formula, the first thing you need is a formula block. Here’s how to add it:

1. Insert a Formula Block: Click the "+" icon and choose Formula from the list of property types.

2. Edit Property: Click Edit Property to change the name or the icon of the formula block, if desired.

3. Start Editing the Formula: In the Edit Property panel, click Edit Formula, or simply click anywhere below the formula column to start typing your formula.

Now, let’s dive into writing the formula!

Step 2: Writing the Formula

Single Condition Formula

Notion makes it easy to write formulas that evaluate a single condition. Here’s how to do it:

1. Type the if keyword: Start by typing if to begin the formula. This indicates you're setting up a conditional statement.

2. Choose your condition: Select a property to evaluate, like “Project Status” or “Inventory Level”.

3.Write the formula: The basic structure is:

if(condition == "value", "output if true", "output if false")

Example:

if(Status == "Done", "Completed", "Not Completed")

This formula checks if the Status is equal to "Done". If it is, it will display "Completed", otherwise, it will display "Not Completed".

4. Save the formula: Once you’ve finished, click Save, and the formula will apply to all rows in your table.

Nested Conditions Formula (Multiple Conditions)

If you need to evaluate multiple conditions, you can use nested if statements. This is useful for more complex scenarios, like handling different stages of a project.

1. Type the if keyword: As before, start by typing if to begin the formula.

2. Choose your condition: Select the property you want to evaluate.

3. Add nested conditions: Here’s where things get like a "nested doll" — each additional condition gets placed inside the previous one. Think of it like stacking dolls, where each layer of logic is nested inside the one before it. For example, if the project has three stages (A, B, and C), you might write:

if(Status == "A", "1", if(Status == "B", "2", if(Status == "C", "3")))

In this case:

  • If Status is "A", the output will be "1".
  • If Status is "B", the output will be "2".
  • If Status is "C", the output will be "3".

Just like a set of Russian dolls, each condition is nested within the previous one.

4. Save the formula: Once you've completed the formula, click Save, and the changes will be applied.

Important Notes:

  • Case Sensitivity: Notion formulas are case-sensitive, so make sure the values are typed exactly as they appear.