Solved: How to create a dynamic progress bar in Notion formulas 2.0 that tracks remaining days versus task completion percentage
📌 The Problem Explained
Section titled “📌 The Problem Explained”A standard progress bar in Notion only shows how much of a task is finished. However, for high-stakes projects, completion percentage alone is misleading. You might be 50% done with a task, but if 90% of your available time has already passed, you are technically behind schedule.
Users often struggle to build a formula that compares Work Progress (actual completion) against Time Progress (how much of the project window has elapsed) to provide a visual “Status” indicator (e.g., Ahead, On Track, or Behind).
💡 The Quick Solution
Section titled “💡 The Quick Solution”To implement this, ensure your database has a Date property (with a start and end date) named Timeline and a Number property (set to Percent format) named Completion.
Paste the following formula into a new Formula property:
let( totalDays, dateBetween(prop("Timeline").dateEnd(), prop("Timeline").dateStart(), "days"), elapsedDays, dateBetween(now(), prop("Timeline").dateStart(), "days"), timeProgress, min(max(elapsedDays / totalDays, 0), 1), workProgress, prop("Completion"), status, if(workProgress >= timeProgress, "🟢 Ahead", "🔴 Behind"), repeat("◼", round(workProgress * 10)) + repeat("◻", 10 - round(workProgress * 10)) + " " + round(workProgress * 100) + "% | " + status)🛠️ Step-by-Step Breakdown
Section titled “🛠️ Step-by-Step Breakdown”Follow these steps to configure your database and understand how the logic works:
| Step | Action | Description |
|---|---|---|
| 1 | Create Properties | Add a Date property called Timeline (toggle End Date on) and a Number property called Completion. |
| 2 | Set Number Format | Click on the Completion property > Edit Property > Number format > Percent. |
| 3 | Define let Variables |
Using let() allows us to define “totalDays” and “elapsedDays” once, making the formula faster and easier to read. |
| 4 | Calculate Time % | timeProgress divides days passed by total duration. min(max(..., 0), 1) ensures the value stays between 0% and 100%. |
| 5 | The Comparison | The formula compares workProgress (manual input) to timeProgress (automatic). If work >= time, you are “Ahead.” |
| 6 | Visual Bar | repeat("◼", ...) creates the filled portion of the bar, while repeat("◻", ...) creates the empty track. |
⚠️ Common Mistakes to Avoid
Section titled “⚠️ Common Mistakes to Avoid”- Missing End Dates: If your
Timelineproperty only has a start date, thedateEnd()function will return the same value asdateStart(), resulting in a “Divide by zero” error. Always ensure a date range is selected. - Date Property Naming: Notion Formulas 2.0 is case-sensitive. If your property is named “timeline” (lowercase), but the formula uses
prop("Timeline"), the formula will break. - Percent Scaling: Remember that in Notion, “100%” is stored as the number
1. If you manually type50into a percent field thinking it is 50%, the formula will treat it as 5000%. Always input decimals (0.5) or use the slider.