I. Introduction
- Explanation of what the tutorial will cover
- Overview of different types of progress bars
II. Tour of Final Progress Bar
- Showcase of the final progress bar
- Explanation of its features
III. Classic Progress Bar
- Explanation of how to create a basic progress bar
- Tips on customizing the style and design
IV. Slider Progress Bar
- Walkthrough on how to add a slider function to a progress bar
- Tips on how to customize the slider
V. Date Range Progress Bar
- Explanation of how to create a progress bar that is based on a date range
- Overview of the formula and code
VI. Polishing the Date Range Progress Bar
- Tips on how to make the date range progress bar more efficient and user-friendly
- Troubleshooting common issues
VII. Outro
- Summary of what was covered in the tutorial
- Additional resources for learning more about progress bars
- Reminder to ask any questions on Discord
- Preview of upcoming tutorial on shorthand with digital notes
I'm really surprised that I haven't made this video yet. We're going to talk about progress bars inside of Notion. In fact, whenever I think about this video, I always assume I've already made it. So, today I'm going to show you sort of the anatomy of this progress bar formula in its shortest, and in my opinion, easiest way to write it. I'm also going to show you some of my favorite types of progress bars and my favorite designs to use as well as some interesting use cases.
Two use cases we're going to talk about are the classic progress bar in reference to a book or bookshelf, and book reading progress. Another use case is for finding the progress in a date range, so from today inside of a date range, what the progress is maybe to like a deadline.
So, let's just get right into this. Let's look at the final product. I want to make the first example of a book reading database. At the left-hand side, we'll have the title of the books, and then just a property for pages read, and total pages. This is going to give us a percentage of course, read divided by total pages will give us that, and then we'll plug that percentage into this progress bar.
So, really all you need is a percentage in order to create a progress bar, and a progress bar can be used for more than just a bookshelf or for goal progress. You can also use it for date ranges. So, in this example we're also going to create a date range progress between start and an end date. Inside of this date property, you can toggle and date trigger a start date that you maybe want to start working on a project, and an end date for a deadline. And what I want to see is where today lies within this date range and what percentage of the way is complete to the deadline. And in this case, it is 46%.
So let's just get right into making this from scratch. Before we do, I want to show you these three symbols at the top left-hand corner. I grabbed these from a website called compart.com. Here you can search for different unique symbols. So, if I were to look for arrows for instance, I can find some arrows here that are more unique, that don't show up in my emoji pop-up menu. So, I just grabbed these three symbols from there.
Like I said, we just need a percentage to create a progress bar, and the first function you're going to want to know is the slice function. Inside of slice inside of these parentheses, I'm going to put in a text value, and this is going to be the line of the progress bar. For right now, I'm just going to put in dashes from my keyboard, and then later put in this custom dash to replace it when we're done. So, I'm going to put 10 dashes so 3, 4, 5, 6, 7, 8, 9, 10, and then comma space, and right here I'm going to put in how many dashes I want to remove or slice away. So, let's say I want to slice away ten, well that would slice away every dash. If I want to do nine, one would appear, slice away eight, seven, six, five, four, three, and two and one or zero. So, this is how this progress bar is going to move, but what I want to do is go comma again, and put in 10. This is going to move the slider in the other direction.
So, if I were to go 9, 8, 7, 6, 5, 4, 3, 2, and 1, it will move that way. So, this is the direction I want to move this progress bar.
What we really want to do is just replace this 10 with this percentage we're getting from here. Let's exit out of here and just make another temporary formula.
Here, I just want to find that percentage pretty simply. You're going to go prop or property, come down to property read, and I'm going to divide this by total pages and that will give us this percentage. If I were to click this one, two, three button and go to percent it will give us 100, 29, 68, 97.
What I want to do is make sure that these numbers range from 0 to 10, so we can replace this 10 with it. So, to do this, I'm just going to times this by 10. And now, I have 10, 2, 6, and 9. From here, I'm just going to clean up these numbers with a round function.
There are three types of round functions: You have just regular round, you can wrap it around, or you can round it down or up. You can round it down with floor or round it up with seal. I'm going to use floor and the reason I'm using floor is because I want to make sure, whenever we have a 90 percent or over that, it isn't rounding up to 100. So, we don't want to round up, I want to round down to 9.
So now that I have this, actually, I can just copy all this here and just replace the 10 with it. Now, I see that these progress sliders are all different. If I were to change this 136 for instance to 60, it will give me a 1, because it is about 10 percent, 300 is about 60 percent, and of course 456 would give me 10 dashes.
The next thing I'm going to do is replace these dashes with my custom dash I got from that website and I'm just going to replace these with 10 of those, so 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. I'm going to make it bigger and then I'm going to add an emoji to the end. I'm going to add this triangle and to do this, I'm going to go plus and in quotes put that triangle inside of it. Now, if I want to put the percentage at the end, I can do something like this. Just go right inside of here and instead of having 10, I'm going to go 100, and that'll give us the percentage number.
I want to change this to text so we can add it inside of this progress bar. So, to do that, I'm going to format it with the format function and just wrap it around the entire formula and then I'm going to add a percentage sign. Now, what I can do is just copy all of this and at the end of here, just go plus and paste it in, and that should give us that percentage at the end. I do want to put a space between this emoji and the percentage. So, within this triangle text value, I'm just going to put a space after.
That's just giving you a minimal classic progress bar. Let's turn this into a slider. So, to do that, let's first actually copy and paste this formatting.
The text provided describes a process of modifying a progress bar. The speaker is explaining how to change a triangle shape into a circle shape, move a line to the other side, and make the progress bar longer by adding more dashes. They mention using a formula to calculate the percentage of progress, which they demonstrate by using the date between function to find the number of days between the start date and the current date, then dividing that by the total number of days in the date range. They mention also replacing placeholder number and add a space. At the end, They also mention about getting an emoji of a circle and copy-pasting the front line to the back and make sure the dashes are set to 20 minus the percentage.
Put 100 and then add a percentage sign. 25, put that at the end of this. So, plus paste it in and then add that space.
So, I really have to locate it here we have plus format. That is the format of the percentage I'm going to put right in between two quotes plus, and then put a space between those quotes.
There is one problem that needs to be solved here and that is if the date range is before today. So, let's say the end date is on the sixth. I want to make sure that this entire slider stays at one hundred percent. You can actually create another property over here for temp to show you how I can add an if statement to the beginning of this.
So, let's just do a test date between the end of property date and now in days. Make sure that B is capital and it says negative four. So, that is four days in the past. I will put the end date on today, it will give me zero. So, I just want to make sure that in this formula here that this is greater than negative one. So, I only want this check box to be ticked if today is within a date range. If it is the ninth, it should be unchecked and we're good.
So, what I'm going to put at the beginning of this slider is an if statement. I'm going to copy this and make sure it says if paste. If this is the case then execute this entire body of formula we just made. If not the false condition at the end just give me this line and then this circle at the end space 100 percent close out that if statement. Now even though that date range is in the past it will stay at 100 percent.
Now let's solve if the date range is in the future. So, if the date range starts on the 11th and ends on the 28th, sorry the 11th and ends on the 28th it will say zero percent. But, if I go to the 12th it will say negative 7. So, what I want to do is again copy and paste this date between put it in here and let's see what happens date between the start instead of the end. Looks like we're at 1 and at 13 2 14 is three, tomorrow would be zero and today would be zero.
So, right here is where we want to start. So, if we are greater than 0 it seems, I just want this to say 0. So, greater than 0. We're going to put another if statement at the beginning here and say if paste that in, if date between start and now is greater than zero days. I want the bar to look like this, let's just copy this put the dot at the start space zero percent.
Put a comma after this to separate the second if statement and there are two if statements here. I'm going to put a second parentheses to close out that second if statement. You can take a look at this and maybe pause the video if you need. It should be good.
Let's get rid of this temporary property and test this out. Let's say the start date is on the first and the end date is on the ninth it will stay at 100 and if the end date is on the 28th and the start is on the 12th it should say zero and remain that way. If you have any questions about this formula or if you have any questions about particular functions, let me know. I have a link to discord down in the description.