Filter Databases to Show Current Week Records

23 March, 2022

With this solution, you can filter your database to only show records for the current week. Plus you can set which day of the week you want the week to start on.

For example, I have a habit tracker that has an entry for each day of the year and I want to filter the database to see my progress for this week.

Habit tracker database with one row for everyday of the year

Habit tracker database with one row for everyday of the year

Today is Wednesday 23 March 2022 and I want the database to only show the records for Saturday 19th March to Friday 25th March.

Using the out-of-the-box filters in Notion I can view the database where the date is within the past week. Or I can filter where the date is within the next week. Neither option displays the records as I want:

Notion week filters and their results on the habit tracker database

Notion week filters and their results on the habit tracker database

The solution is to create a current week check box column, that is ticked on if the date is this week and ticked off if it is not. You can then create a filter to show rows of the database where the current week checkbox is ticked.

How to set up the current week filter

For this solution to work you need a date column in your database. In this example the date column is called "Date"

  • Add a new column to the database and name it "Current Week"
  • Set the column type to formula and add the following formula, replacing "Date" with your date column name.
if(formatDate(prop("Date"),"w") == formatDate(now(),"w"), true, false)
  • Add a filter using the "Current Week" column and set it to only shows records where it is checked.

This filter displays the records from Sunday 20th Mar to Saturday 26th March.

Habit tracker database with current week filter applied

Habit tracker database with current week filter applied

How to start the week on a Saturday

By default, Notion starts the week on a Sunday, but what if you want the week to start on Saturday and finish on Friday? All you have to do is tweak the formula, you do this by subtracting one day from the date fields as follows:

if(formatDate(dateSubtract(prop("Date"), 1, "days"), "w") == formatDate(dateSubtract(now(), 1, "days"), "w"), true, false)

Now when the filter is applied the Habit Tracker database shows records for the week starting on a Monday and ending on a Sunday.

The habit trackers filtered for the current week from Mon the Sun

The habit trackers filtered for the current week from Mon the Sun

The filter will automatically display data for the following week when you get to Monday.

Note: when I change the formula for the current week column it only displays 6 days from the database until I refresh the page.


PDF invoices for Notion. Use Notion Invoice.

Manage all your invoices in Notion, then generate and track PDF invoices using Notion Invoice.

Try Notion Invoice