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.
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:
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.
For this solution to work you need a date column in your database. In this example the date column is called "Date"
if(formatDate(prop("Date"),"w") == formatDate(now(),"w"), true, false)
This filter displays the records from Sunday 20th Mar to Saturday 26th March.
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 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.
Manage all your invoices in Notion, then generate and track PDF invoices using Notion Invoice.Try Notion Invoice