Database

Notion Tips: Simplified Progress Bar Formula With Slice

Screen Shot 2020-06-05 at 11.24.40 AM.png

💡 Alt Progress Bar

Using the slice function in Notion, one can simplify the classic progress bar formula created with quite a lot of if statements. This shortened syntax will make the formula a lot easier to write and edit, especially if you want to change the emojis quickly. Let me show you how it works.

Screen Shot 2020-06-06 at 6.47.29 PM.png

Formula: slice("⌬⌬⌬⌬⌬⌬⌬⌬⌬✓", 0, prop("Pages Read") / prop("Pages") * 10) + " " + format(prop("Pages Read") / prop("Pages") * 100) + "%"

The Breakdown

  • slice("⌬⌬⌬⌬⌬⌬⌬⌬⌬✓", 0, prop("Pages Read") / prop("Pages") * 10)

    • take what your progress bar looks like at 100% ...

    • AND slice 0 characters from left to right ...

    • AND whatever the result of property "Pages Read" divided by property "Pages" multiplied by 10 from right to left.

  • + " " - the addition of an empty space.

  • + format(prop("Pages Read") / prop("Pages") * 100) - the addition of what results from the following calculation

    • property "pages Read divided by property "Pages" multiplied by 100.

  • + "%" - the addition of the percentage sign

VIEW IN NOTION