DEV Community

Lux Seminare
Lux Seminare

Posted on

2 Notion Formulas for Productivity

2 Notion Formulas That Actually Get Used Daily

Most Notion formula guides show you what's possible. This one shows you what's practical.

There are hundreds of formulas you could build in Notion. Most of them are clever solutions to problems you don't have. These two are the ones that show up in real workflows every day — the ones that change how the workspace actually feels to use, not just how it looks in a screenshot.

Each one comes with the exact formula, an explanation of what it does and why, and a note on how to set it up from scratch.

A Quick Note on Notion's Formula Versions

Notion updated its formula engine in 2023. If you're on a workspace created after mid-2023, you're using Formulas 2.0, which has slightly different syntax from the original. The formulas below are written for Formulas 2.0. If yours throws an error, the most common culprit is the prop() wrapper — older formula versions don't use it, so remove prop() and reference the property name directly if needed.

Formula 1: Progress Percentage

What it does: Shows what percentage of a project's tasks are complete, displayed as both a number and a visual progress bar. Handles edge cases like empty projects, backlog items, and on-hold work automatically.

Why it matters: A project database with a status column tells you a project is "In Progress." That's not information — that's a label. A progress percentage tells you it's 20% done, or 80% done, which are completely different situations. One number replaces the need to click into a project to understand where it stands.

Where to use it: In a Projects database that has a relation to a Tasks database.

Setup:

  1. In your Projects database, add a Relation property linking to your Tasks database — name it "Tasks"
  2. Add two Rollup properties:
  • Rollup 1: name "Total Tasks" — Relation: Tasks — Property: Name — Calculate: Count all
  • Rollup 2: name "Completed Tasks" — Relation: Tasks — Property: Status — Calculate: Count values where Status = Done
  1. Add a Formula property — name it "Progress"

The formula:

if(Total Tasks > 0 and Completed Tasks == Total Tasks, "100%",
if(Status == "backlog" or Status == "on hold", "0%",
if(Total Tasks > 0,
  let(
    completed_val, if(empty(Completed Tasks), 0, toNumber(Completed Tasks)),
    total_val, if(empty(Total Tasks), 0, toNumber(Total Tasks)),
    percentage, round(completed_val / total_val * 100),
    progress_blocks_count, floor(percentage / 10),
    filled_bar, (substring("", 0, progress_blocks_count)),
    empty_bar, (substring("", 0, 10 - progress_blocks_count)),
    format(percentage) + "% " + filled_bar + empty_bar
  ),
"0%")))
Enter fullscreen mode Exit fullscreen mode

What each part does:
if(Total Tasks > 0 and Completed Tasks == Total Tasks, "100%", — the first check handles the fully complete case cleanly. If every task is done, return "100%" immediately without running the rest of the calculation.
if(Status == "backlog" or Status == "on hold", "0%", — projects in Backlog or On Hold return "0%" regardless of their task count. A project you're not working on yet shouldn't show partial progress even if it has tasks attached.
if(Total Tasks > 0, — only run the calculation if tasks actually exist. This prevents division-by-zero errors on new projects with no tasks linked yet.
let( — opens a local variable scope. Everything inside let() is calculated once and reused, keeping the formula readable rather than repeating the same expressions multiple times.
completed_val, if(empty(Completed Tasks), 0, toNumber(Completed Tasks)), — converts the Completed Tasks rollup to a number, defaulting to 0 if the rollup is empty.
total_val, if(empty(Total Tasks), 0, toNumber(Total Tasks)), — same conversion for Total Tasks.
percentage, round(completed_val / total_val * 100), — divides completed by total, multiplies by 100, rounds to the nearest whole number.
progress_blocks_count, floor(percentage / 10), — converts the percentage to a 0–10 scale for the visual bar. 70% becomes 7 filled blocks.
filled_bar, (substring("", 0, progress_blocks_count)), — builds the filled portion of the visual bar using a repeated character, sliced to the right length.
empty_bar, (substring("", 0, 10 - progress_blocks_count)), — builds the empty portion of the bar for the remaining blocks.
format(percentage) + "% " + filled_bar + empty_bar — concatenates the percentage number with the visual bar into a single readable output like 70% ███████░░░
"0%"))) — the fallback for any project with no tasks attached.

The result: A single property that shows both the precise percentage and a visual bar — 70% ███████░░░ — updating automatically as tasks are completed. Projects in Backlog or On Hold always show 0% cleanly, and fully completed projects snap to 100% without rounding errors.

One thing to watch: The Status check in the second line references your project's Status property directly — make sure your Status options are named exactly "backlog" and "on hold" (lowercase) or update the formula strings to match your exact option names. The comparison is case-sensitive.

Formula 2: Automatic Task Value Calculation

What it does: Assigns a point value to each task automatically based on its priority — so the value is set the moment you choose a priority, with no separate field to fill in.

Why it matters: If you're using a gamified productivity system — or building toward one — manual value entry creates friction at exactly the wrong moment. You've just decided to add a task. The last thing you want to do is also decide how many points it's worth. This formula makes the value decision automatic: High priority tasks give more points, Low priority tasks give fewer, and you only have to set the priority — which you'd be doing anyway.

Where to use it: In a Tasks database with a Priority select property.

Setup:

  1. In your Tasks database, confirm you have a Select property called "Priority" with options: Low, Medium, High
  2. Add a Formula property — name it "Task Value"

The formula:

if(Priority == "High", 10, if(Priority == "Medium", 5, 1))
Enter fullscreen mode Exit fullscreen mode

What each part does:

if(Priority == "High", 10, — if priority is High, the task is worth 10 points.

if(Priority == "Medium", 5, — Medium priority tasks earn 5 points.

1)) — everything else — Low priority or unset priority — earns 1 point. Two closing parentheses for two nested ifs. Low priority tasks still get 1 point rather than 0, which means every completed task contributes something regardless of how it was prioritized.

The result: Every task automatically has a value the moment you set its priority. No separate field to fill in, no decisions to make. High = 10, Medium = 5, Low = 1.

Rolling Task Value up to your Character Sheet: Once tasks have values, create a Rollup in your Character Sheet database:

  • Relation: Tasks
  • Property: Task Value
  • Filter: Status = Done
  • Calculate: Sum

This gives you a running total of points earned from completed tasks only — the foundation of the leveling system. Every time you complete a task, the rollup updates automatically and your total climbs.

One thing to watch: The formula checks the exact string value of your Priority options. If your options are named "HIGH" or "high" or "High Priority" instead of "High," the formula won't match. Open your Priority property settings, check the exact option names, and update the formula strings to match.

Using Both Together

These formulas work independently — you can add either one to an existing workspace without touching the other. But they're designed to complement each other.

The progress formula tells you where your projects stand. The task value formula rewards you for completing the work that moves them forward. Together they create a feedback loop: you can see the project moving (progress %), and each completion registers as a real gain (task value rolling up to your total).

That loop — visibility and reward — is what most productivity systems are missing. The checkboxes are there. The motivation to check them isn't.

If you want both of these formulas pre-configured in a workspace that's already set up and linked together, that's what DevHub Basic gives you. The free version has the full database structure with these formulas already in place.

If you'd rather build it yourself, copy the formulas above directly — they're ready to paste into your formula editor.

Top comments (0)