The guide details the development of the Notion VIP Progress Bars template. Dissect it for a better understanding of Notion, or simply copy the contents.
As you track your projects in Notion, visual progress bars offer a quick snapshot of your progress, an aesthetic enhancement, and a subtle source of motivation. By pairing creative characters with a few Notion functions, you can create beautiful, inspiring progress bars to bolster your workspaces.
The Functions
To create your progress bars, you’ll use the three below functions. If you’re new to formulas, consider starting with Meet Notion’s Formula Property.
slice()
The slice()
function returns a segment of a provided text string
. It takes three arguments:
- The original
string
- The starting point, where the first character is
0
. - The ending point (optional).
Example: slice( "Into the ocean.", 9, 14 )
→ "ocean"
if()
The if()
function allows you to perform an action if a condition is met, or another action if the condition is unmet. By nesting if()
functions, or placing them within one another, you can specify actions for numerous conditions.
The if()
function takes three arguments:
- The test expression, which evaluates to
true
orfalse
. - The operation to perform if
true
. - The operation to perform if
false
.
Example: if( 2 < 3, "Yes", "No" )
→ "Yes"
Comparison Operators
For the first argument — the test expression — you can use comparison functions, such as test()
or comparison operators, which you’ll find in The Notion Formula Cheat Sheet.
round()
The round()
function rounds the provided decimal number
to the nearest integer.
Example: round( 3.2 )
→ 3
format()
The format()
function converts a provided number
to a text string
.
Example: format( 20 )
→ "20"
Your Percentage Property
To visualize your progress, you first need to calculate it as a percentage within an independent property. You have many ways of doing so; here are two:
Completed Units vs. Total Units
For each project in your database, you might have a property for total units required for completion, then another property for currently completed units.
For example, a school photographer might have a database of classes, with properties for Total Students and Completed Students.
In a Progress (Percentage) property, you can divide the completed units by the total units:
prop( "Completed Students" ) / prop( "Total Students" )
Rollup
If you follow the Bulletproof Workspace methodology your Projects database is linked to your Tasks database. Therefore, you can add a Rollup
property that automatically calculates the percentage of tasks completed for the project:
- Add the
Rollup
property. - Choose your Tasks database.
- Choose the
Checkbox
field that indicates the task is complete. - Within
Calculate
, choosePercentage checked
.
Your Creative Characters
Your progress bar will include creative characters to represent completed and uncompleted segments of your bar. Here are a few you might consider:
- Stars → ★☆
- Circles → ●○
- Shades → ▓░
Create Your Progress Bar
With your Progress (Percent) property created and your creative characters determined, you’re ready to create your progress bar. Create a new Formula
property, name it Progress, then add this formula:
slice("★★★★★★★★★★", 0, round(prop("Progress (Percent)") * 10)) + slice("☆☆☆☆☆☆☆☆☆☆", 0, round((1 - prop("Progress (Percent)")) * 10)) + " " + if(prop("Completed Units") == 0, "0", format(round(prop("Progress (Percent)") * 100))) + "%"
How It Works
Display Solid Stars
The formula starts by determining the number of solid stars to display:
- It uses the
slice()
function, where the initialstring
is ten solid stars. - The starting point is
0
. - For the end point, it multiplies the percentage by
10
to provide a decimal number between1
and10
. It then rounds that decimal using theround()
function.
Add Empty Stars
- The formula takes the same approach with the empty stars, but it subtracts the percentage from
1
. - To append it to the solid stars, it uses the concatenation operator (
+
)
Display the Numeric Percentage
Because your creative characters form a text string
, the appended percentage also needs to be a string
.
- If Completed Units is
0
, the formula returns"0"
(astring
). - Otherwise:
- It multiples the percentage by
100
to return a number between1
and100
. - It then uses
round()
to eliminate any decimals. - Then, the
format()
function converts it to astring
.
- It multiples the percentage by
- Finally, the concatenation operator adds the
%
character.
Questions? Tweet @WilliamNutt.