Using Formulas in Notion for Colored Progress Bars

February 22, 2024

Notion is my favorite note-taking, goal-tracking, second brain software but it does have some limitations.  Over time, I'm certain these will get resolved with updates but for now, let's fix things in our own way.

In this article, we're going to talk about using the formulas field to create a colored progress bar.  This progress bar will be different than the "number bar" in two ways:

1) Supports colors based on value (similar to conditional formatting)

2) Uses emojis to generate the bar

For my use case, I want to track my Wordle results.  Previously, with the "bar" element, you'd see your score represented like so:

This wasn't very graphically appealing since the bar was always one specific color and would not change based on value.

Instructions

  1. First, let's create a new field called Score Bar with the type of Formula.
  2. For this usecase, we know that there are 6 possible points and that 1 point is the best (green) and 6 points is the worst (red).  We also know that we are storing the score in a field called Score.  Due to this, we'll use this formula: 
    if(prop("Score") == 6, "🟥🟥🟥🟥🟥🟥", 
    if(prop("Score") == 5, "🟨🟨🟨🟨🟨⬜", 
    if(prop("Score") == 4, "🟨🟨🟨🟨⬜⬜", 
    if(prop("Score") == 3, "🟩🟩🟩⬜⬜⬜", 
    if(prop("Score") == 2, "🟩🟩⬜⬜⬜⬜", 
    "🟩⬜⬜⬜⬜⬜")))))
  3. Save the field.

At this point, your Score Bar field should auto-update based on whatever value you've put into your Score field.  You can also display the Score Bar on the calendar view (or any other view) by selecting the ellipsis (top right of database), selecting Properties, and then dragging the Score Bar field to the top section labeled Shown.

And, that's it!  Feel free to replace the emojis with whatever you'd like and tweak the values.  This should help guide you to a fully-automated colored progress bar for your use case.  Enjoy!

Update

After a few weeks of using this formula, I have updated it:

if(prop("Score") == 0, "🟥🟥🟥🟥🟥🟥", 
if(prop("Score") == 6, "🟧🟧🟧🟧🟧🟧", 
if(prop("Score") == 5, "🟨🟨🟨🟨🟨⬜", 
if(prop("Score") == 4, "🟩🟩🟩🟩⬜⬜", 
if(prop("Score") == 3, "🟩🟩🟩⬜⬜⬜", 
if(prop("Score") == 2, "🟩🟩⬜⬜⬜⬜", 
"🟩⬜⬜⬜⬜⬜"))))))

Additional Reading

©2024 Tyler Wright