πŸ•ŠοΈ

Double Progress Bar

Master Tag
Tips & Tricks
Created
Feb 11, 2021 10:12 PM
Usage
empty
floor
Format
dateBetween
Slice
Web Tags
Database
Formula
Alternatives
Cover

Donate

notion image
πŸ“‹
What's happening here? Let's assume you're reading material for an exam, and you want to give yourself a number of days to finish reading the material and make sense of the text before the exam. Progress bar 1: The reading progress: The reading material progress. Progress bar 2: The date progress: The date progress from now to exam THE GOAL: make sure the green book leads the red dot (stay ahead of schedule)
Reading
Pages
Name
Date Range
Page On
Double Progress Bar
456
Feb 10, 2021 β†’ Feb 28, 2021
134
78
Feb 3, 2021 β†’ Feb 15, 2021
56
158
Feb 2, 2021 β†’ Feb 22, 2021
120

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%"))), "")