Home
⌛

How long has it been?

I’ve made the page we’re going to build below public, where you can duplicate it to your own workspace: https://scales-family.notion.site/Since-69bc560d0b1144a8817efd737bfa44aa. Enjoy and happy reading!

🔗 ⏲️

I like to make sure I do certain things regularly. Not every day, but regularly. I want to make sure I change my sheets enough, I change the blade in my razor enough, and go to the gym enough (I should go every day, but until then...)
Let’s do it in Notion. We’ll learn about Relations, Rollups, and Formulas.
To your brand new page, create a database. These will be the “Things” we’re tracking the days since.
Make sure to select “Table view”
Make sure to select “Table view”
Our shiny new table
Our shiny new table
Then, we’ll create a second table to track each time we do one of these things. We’ll need three things:
Our new events table
Our new events table
For “the type of event” we’ll use a “Relation” which allows us to reference another table. In this case, we’ll reference the “Things” table.
So advanced!
So advanced!
Then we’ll make sure to select our original Things database.
Select the Things database to relate it to
Select the Things database to relate it to
And thanks to the new fancy relation menu, we can choose whether or not “Things” also points back to “Events.” We want it to! We’ll see why in just a second.
Let’s make sure to “Show on Things” - as we’ll need each “Thing” to be able to access all of its events.
Let’s make sure to “Show on Things” - as we’ll need each “Thing” to be able to access all of its events.
Now let’s add some events to our table.
I reordered the columns to be more useful. See how I ignore “Name” entirely
I reordered the columns to be more useful. See how I ignore “Name” entirely
Now, the fun part. Check out “Things” table, and you’ll see some “Things” have events associated with them.
Lots of Untitled, but it’s okay for now.
Lots of Untitled, but it’s okay for now.
Let’s add a new column to “Things” which is an aggregation of the “Events” associated with each “Thing.” Notion calls these “Rollups.” We’ll use the following properties:
The relation we want to aggregate is “Events” and the property we care about is “Date.” From all these “Date”s, we want the most recent one.
The relation we want to aggregate is “Events” and the property we care about is “Date.” From all these “Date”s, we want the most recent one.
And magically, we now have a column representing the last time one of these “Things” happened.
3 days ago? It happened 2! I guess time of days matters as well, but that’s not exactly what we want.
3 days ago? It happened 2! I guess time of days matters as well, but that’s not exactly what we want.
Going a step further, we can turn the “X days/months/years ago” into a single number. Maybe it’s less readable, but it’s more precise!
Let’s add another column to “Things” and we’ll select our third ✨ Advanced ✨ property, Formula.
We’ll make use of dateBetween, prop, and now to compute how many days it’s been since “Most recent.”
dateBetween(now(), prop(
dateBetween(now(), prop("Most recent"), "days")
And voila, our fancy event tracker. Happy habit tracking!