How to Use the Notion Formula 2.0 Builder Prompt to Write Progress Bars, Badges, and Relation Math That Work
Write working Notion Formula 2.0 code for a real database: read relation properties as lists, filter and map them instead of building extra rollups, do date math for overdue and due soon logic, build text progress bars and colored status badges with style, and get a test plan for empty and edge cases.

Notion's Formula 2.0 changed how formulas work. Relations now return lists of pages, you can filter and map them directly, and lets makes long formulas readable. Old tutorials and copied formulas often use the previous syntax and fail without a clear reason. The Notion Formula 2.0 Builder: Database Formulas with lets, ifs, Relation Lists, filter and map, Date Math with dateBetween, Progress Bars, and Styled Status Badges prompt writes formulas for your exact database properties, explains the date math, handles empty values, and gives you test rows to check before you roll anything out.
What the prompt produces
- A property map showing how each property reads inside a formula.
- One formula per goal, written with lets and ifs and indented for readability.
- Relation logic on lists, using filter, map, and length so you may not need extra rollups.
- Date math with today, dateBetween, and dateAdd, with an explanation of each result's sign.
- Display formatting such as progress bars and colored badges with style.
- Guard clauses for empty relations, missing dates, and division by zero.
- A test plan with sample rows and expected results.
How to fill the inputs
DatabaseSchema lists every property with its exact name and type. Names must match exactly, including capitals.
RelatedDatabases lists the related databases and the properties the formula needs from them.
FormulaGoals describes each formula in plain words, like a progress bar or an overdue badge.
DisplayStyle sets how results should look: plain numbers, text, colored badges, or a bar.
EdgeCases names the situations that break formulas, such as projects with no tasks or tasks with no due date.
Reading the example output
The example builds three formulas for a Projects database related to a Tasks database:
- The progress formula counts done tasks with a filter on the relation list, then draws a ten dot bar. A guard shows a message when there are no tasks instead of dividing by zero.
- The hours left formula filters open tasks, maps their estimates, treats empty estimates as zero, and sums the result.
- The badge formula uses ifs to show Complete, a count of overdue tasks, Due soon, or On track, each with its own color.
- The sign notes explain dateBetween, which returns the first date minus the second, so you know why the comparison uses greater than zero.
- The test table lists four sample projects and the output each formula should show.
Tips for better results
- Copy property names straight from the database to avoid typos.
- Build one formula at a time and test it before adding the next.
- Keep an old rollup until the new formula matches it, then delete the rollup.
- Use the formula editor's built in reference to confirm any function you have not used before.
- Add the test rows to a copy of the database, not the live one.
Mistakes to avoid
- Do not paste formulas written for the old syntax and expect them to work.
- Do not compare status values with different spelling than the schema.
- Do not create formulas that reference each other in a loop.
- Do not forget empty dates. They are the most common cause of broken badges.
Who it is for
Notion power users, consultants building client workspaces, project managers tracking work in Notion, students organizing coursework, and teams moving from spreadsheets to Notion databases.
Related PromptDig links
Open the Notion Formula 2.0 Builder: Database Formulas with lets, ifs, Relation Lists, filter and map, Date Math with dateBetween, Progress Bars, and Styled Status Badges prompt and paste your database schema. For more productivity prompts, Browse more prompts. If you have a Notion or workflow prompt that works, Share a prompt.