Database

Notion Formula: Double Progress Bar

notion-formula-double-progress-bar.png

📚 Dual Progress

Here’s an alternative to the classic Notion progress bar that may be interesting to the power-user. Let's assume you're reading for an exam, and you want to give yourself a number of days to finish reading and make sense of the text before the exam. This Notion formula will keep track of task progress AND progress to a deadline.

The Database Properties

Screen Shot 2021-02-11 at 8.43.50 PM.png
  • Date Range: time to complete task

  • Pages: pages to read

  • Page On: pages completed

The Goal: make sure the green book leads the red dot. In other words, stay ahead of schedule.

The Formula

if(not empty(prop("Pages")) and not empty(prop("Date Range")), "Progress: " + format(slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * prop("Page On") / prop("Pages"))) + "📗" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * prop("Page On") / prop("Pages"))) + " " + format(floor(100 * prop("Page On") / prop("Pages"))) + "%") + "\nDeadline: " + format(if(dateBetween(start(prop("Date Range")), now(), "days") > 0, "⭕‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒ 0%", if(dateBetween(end(prop("Date Range")), now(), "days") > -1, slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "⭕" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + " " + format(floor(100 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "%", "‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒⭕ 100%"))), "")

Untitled_Artwork 40.png

Learn more about finding the progress between now and a deadline and creating a progress bar here.

 

Further Reading