Red Gregory

View Original

Notion Formula: A Minimal Progress Bar Slider

The Progress Formula With Dashed Line

if(prop("Page Read") / prop("Pages") == 1, "┅┅┅┅┅┅┅┅┅⚫" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .9, "┅┅┅┅┅┅┅┅⚫┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .8, "┅┅┅┅┅┅┅⚫┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .7, "┅┅┅┅┅┅⚫┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .6, "┅┅┅┅┅⚫┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .5, "┅┅┅┅⚫┅┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .4, "┅┅┅⚫┅┅┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .3, "┅┅⚫┅┅┅┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .2, "┅⚫┅┅┅┅┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", if(prop("Page Read") / prop("Pages") >= .1, "⚫┅┅┅┅┅┅┅┅┅" + " " + format(round(prop("Page Read") / prop("Pages") * 100)) + "%", "┅┅┅┅┅┅┅┅┅┅ 0%"))))))))))


Simplified Version W/ Solid Line (Credit)

concat(slice("––––––––––––––––––––", 0, 20 * prop("Pages Read") / prop("Total Pages")), "⚫", slice("––––––––––––––––––––", 0, 20 - 20 * prop("Pages Read") / prop("Total Pages")), " ", format(floor(100 * prop("Pages Read") / prop("Total Pages"))), "%")


Colorful Version

if(prop("Pages Read") / prop("Total Pages") == 1, "┅┅┅┅┅┅┅┅┅🔵" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .9, "┅┅┅┅┅┅┅┅🔵┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .8, "┅┅┅┅┅┅┅🔵┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .7, "┅┅┅┅┅┅🔵┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .6, "┅┅┅┅┅⚫️┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .5, "┅┅┅┅⚫️┅┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .4, "┅┅┅⚫️┅┅┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .3, "┅┅🔴┅┅┅┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .2, "┅🔴┅┅┅┅┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", if(prop("Pages Read") / prop("Total Pages") >= .1, "🔴┅┅┅┅┅┅┅┅┅" + " " + format(round(prop("Pages Read") / prop("Total Pages") * 100)) + "%", "┅┅┅┅┅┅┅┅┅┅ 0%"))))))))))

How To Use The Formula

The properties “Pages” and “Pages Read” are placeholders that must be temporarily in your database before pasting the formula.

  1. Either duplicate the page below and change the "Pages" and "Pages Read" property names to suit your database. OR

  2. Create or temporarily rename two properties in an existing database called "Pages" and "Pages Read", copy and paste formula below into a new formula property, then return the properties to their original names (The formula will automatically update).

See this content in the original post

View Or Copy Example Inside Notion


See this gallery in the original post