Get Statistics for Notion with The Checkbox Method

Written by: Matthias Frank
Last edited: April 13, 2024

Can Notion actually replace a dedicated to-do list app that was specifically designed to just do that: task management?

Yes.

Notion has always been a beast when it comes to organising your notes, task, books – just about anything. That’s because Notion combines the power of spreadsheets, the flexibility of a text processor and the organisation of hierarchical structures under one roof.

Since the release of the Notion API, Notion’s speed issues got compensated and you get your tasks now as quickly into Notion as into any other dedicated To-Do app.

And here’s the last piece to the puzzle that turns Notion into a true powerhouse: Statistics for Notion.

It’s a simple workaround to get the level of insights and statistics in Notion that’s usually reserved for specifically designed software.

Notion Task Manager Statistics

I’m calling it The Checkbox Method and once you know how it’s done, you can use it to gather insights for any sort of Notion Database, not just task managers.

Read on to learn how this is done or jump to the bottom to grab the setup for yourself. Or check out this video walkthrough.

YouTube video

The problem with statistics in Notion

Notion is both amazing and horrible at slicing data for you.

It’s amazing because you can use related databases and various views to see the content of a database in countless ways.

It’s horrible because you’re stuck with this visual representation of your data and can’t ask Notion (natively) to show you that data in numbers.

Wanna see all your books in the category “Non-Fiction”. Here they are.

Wanna know how many there are? Have fun counting.

Luckily, there’s a workaround.

Get Statistics for Notion with The Checkbox Method (Formulas 2.0 Version)

Statistics for Notion Widget

Previously, you had to combine Notion roll-ups with formulas to make statistics for Notion work. But thanks to Notion’s new and improved formula language, you can create the whole setup with a lot less properties, which makes for a much cleaner setup.

It requires a bit more formulas, but I’ll walk you step-by-step through it.

And if you want, you can scroll down further to check out the old approach (that still works totally fine) for statistics in Notion.

For the new approach, you’ll need three things:

  • A Checkbox (by asking Notion a yes-or-no question)
  • A separate analytics database
  • a gallery view

Let’s take a closer look.

Start by asking Notion a Yes-or-No Question

Analytics in Notion Database

First, you need to prep your data in Notion. To do so, go to the database that contains your main information (for example your tasks, your workouts or in this example your sales) and identify the type of insights you’d like to have.

For a sales database that records each sale you’re making, you might be interested in knowing:

  • Total Sales
  • Total Sales Volume
  • Sales This Week
  • Outstanding Payments

Counting all entries (Total Sales) or having a sum of everything (Total Sales Volume) is pretty straightforward and you can even skip this step. For everything else, you need a checkbox.

Luckily, you don’t have to create an actual checkbox property and tick them off manually. Instead, you can ask Notion a yes-or-no question via a formula about the specific insight and Notion will automatically return a checkbox.

Yes or no questions are all questions that involve the equal (==), larger than (>), smaller than (<) or non-equal (!=) operator

This might sound complex, but once you see an example, it’s actually pretty straightforward. Let’s take the “Sales This Week” insight.

The yes-or-no question that you need to ask Notion is:

Is this entry within the current calendar week or not?

And turned into a formula, it looks like this:

formatDate(prop(“Date”),”W”)==formatDate(now(),”W”)

Or in the case of “Outstanding Payments” where you track the order status and “Order Received” is the one stage before payment, it could be something like this:

prop(“Status”)==”Order Received”

Checkbox Method Notion

Last but now least, how about numbers for a specific situation, for example the sum of all outstanding payments?

In that case, you’ll want to use an if formula in a helper property that fills in the order value for outstanding payments and 0 for paid orders. That way, you can later sum up only the outstanding payments:

if(prop(“Waiting for Payment?”), prop(“Value”) ,0)

Fill any data using if statements

Prepare your analytics database

Next, create a separate database for your calculations. Create a relation between the two databases and make sure that each entry in your main database (i.e. the sales database) is connected to one single entry in the analytics databse.

To ensure this is the case for every new entry, set up a default database template that automatically connects each new entry to the database or use Notion’s database automations to do the same.

Then, use formulas to calculate the insights you’re looking for.

If you want to count all elements (i.e. for Total Sales), use this formula:

prop(“Sales”).length()

To sum up all your orders (i.e. for Total Sales Volume) or to calculate the sum of a helper property (like for outstanding payments), use this formula structure:

prop(“Sales”).map(current.prop(“Value”)).sum()

Use Notion Formulas as Rollups

And to count any of your checkbox properties for any remaining insights (i.e. how many payments are outstanding?) use this:

prop(“Sales”).filter(current.prop(“Waiting for Payment?”)==true).length()

Display your Notion Analytics using a Gallery View

Last but not least, create a gallery view for your analytics database and turn on the properties you’d like to see.

You can also add additional context to your numbers with another formula, so that instead of just seeing a number, you’ll see “Total Sales: 987”.

In order to do so, create a helper display property and use the following formula structure:

join([” Total Sales:”,prop(“Total Sales”)],” “)

If you want to add a currency symbol, try this approach:

join([” Total Earnings: “,prop(“Total Sales Volume”).round(),”$”],””)

Helper Display property for Notion Analytics

Get Statistics for Notion with The Checkbox Method (Roll-Up Version)

You can solve that problem and create a new functionality within Notion by combining three features that can’t provide statistics on their own.

Notion Roll-ups + Templates + Notion Formulas = Statistics in Notion

Here’s how The Checkbox Method works.

1. The Magic of Roll-ups

Roll-ups in Notion are like little gateways. You connect a database to another via a relation and then, you can ask the roll-up to gather information for you. Usually, the use case for this looks something like this:

You have your tasks in database A and your projects in database B. Both databases are related. With a roll-up in database B, you could have Notion look into the tasks related to a specific project and sum up the time you’ve assigned to each task. And just like that, database B can display the total amount of time a project will take.

Now that’s cool, but we don’t want to have statistics only for one project. We want them for our whole workspace.

To do that, we create a separate database that has no other job than to create statistics. Let’s call it Statistics. We will only need one entry in it (labelled My Stats).

2. Boring old templates

Within each database, you can set up templates for entries to pre-fill certain information. With your task database, you could have a template for urgent tasks, so that your Property High Priority is tagged automatically.

To make sure that our statistics actually gather information for each and every entry in our database, we need create a base template for all entries in that database to auto-fill a relation to our statistics page.

Now we’re just one step away before statistics can take over our workspace.

We need some little checkboxes. After all, this is called The Checkbox Method.

3. If it can be a checkmark, it can be a statistic

To recap, here’s how our setup looks like right now:

We have a database for which we want statistics. Let’s call this our Main Database.

We have a separate database called Statistics. It only has one entry called My Stats. There’s a relation between the two databases.

We set up templates for our Main Database so that each and every entry here has a pre-filled relation to My Stats.

Now remember, Roll-Ups are great at displaying sums of simple conditions. The easiest thing for a Roll-Up to count are checkboxes. So if we can get Notion to display information – any information – as a simple checkbox, then we can have statistics on it.

That’s it. That’s The Checkbox Method that will turn your Notion workspace into an analytics-powerhouse.

So how do we get Notion to turn “This task is due next week” into a checkbox?

With the use of formulas.

One formula style to rule them all

Notion Formulas will return a checkbox (or boolean for all computer scientists out there) whenever you ask it to test whether a statement is true.

So all you need to do to get whatever statistic your heart desires is to figure out:

How can I ask Notion a yes or no question about it.

Here’s how a simple statistics setup for a task manager could look like:

Simple Statistics Setup for Notion

Important to note: those checkboxes must be set up in your Main Database, not in your Statistics Database.

Done and Waiting On are the two simplest checkboxes to get with any task manager. They are true checkboxes, meaning that you – the user – has to check and uncheck them. So no need to figure out a formula for that (unless you use a Select Property to track that in your database in which case you’d need to add one).

Feel free to copypaste any formula below directly into your workspace. Beware of one quirk though: sometimes, copypasting the formula into notion will use a weird variation of the ” symbol. It looks nearly identical to the Notion one, but Notion gets confused and returns a syntax error. Resolve the problem by either typing out the whole formula or replace all ” symbols by typing ” directly into the Notion Formula box.

For the rest, the formulas look like this:

Overdue statistics in Notion

Overdue checks require nothing but a date property with your deadline and another formula property with this formula:

now() > prop(“Deadline”)

Count how many tasks have a DO date for today

Figuring out whether a task has a DO (or Due) date property that matches today (i.e. should be done today) is as simple as this:

formatDate(now(), “l”) == formatDate(prop(“Do Date”), “l”)

Important to note here: Notion formulas want you to put two equal signs (==) instead of just one to test whether something is really alike. Also, the formula uses the small letter L inside of the quotation marks, not the capital version of i.

Count how many deadlines are within the next week

And lastly, you can see how many deadlines are piling up for the week ahead by asking Notion this question:

and(dateBetween(prop(“Deadline”), now(), “days”) < 7, dateBetween(prop(“Deadline”), now(), “days”) > 0)

How to get any sort of statistic in Notion

You know the drill by now, all you have to do is turn an information you’d love to see into a checkbox. Here are a few more ideas and use cases:

How many books am I reading?

Use a formula to check whether a Status Field equals the specific value you’re looking for. In this case, the checkbox should be ticked if the status says “Reading”

prop(“Status”) == “Reading”

Important to note here: Notion formulas want you to put two equal signs (==) instead of just one to test whether something is really alike.

It’s also case sensitive, so don’t test for “reading” if your status is “Reading”.

How many notes do I have on note-taking

Same idea here, you’re probably using a tag to assign categories to your notes. They can be checked just the same as status fields.

prop(“Tag”) == “Note-Taking”

Ok, but how many notes do I have on both note-taking and zettelkasten?

Well if you’re into Zettelkasten notes, you’d have to test for several statements. That’s done by using the AND operator.

and(prop(“Tag”) == “Note-Taking”, prop(“Tag”) == “Zettelkasten”)

Impressive. Can you also show me how many tasks I’ve completed today?

Sure. All you need is a Last Edited property.

and(prop(“Done?”) == true, formatDate(now(), “l”) == formatDate(prop(“Last Edited”), “l”))

How to get the actual statistics

So now that we got a bunch of pretty checkboxes in our Main Database, let’s do something useful with that.

Head over to the Statistics Database and create roll-ups for each and every checkbox.

Select the corresponding relation, pick the property with the checkbox and have it count the checked or unchecked boxes. Here’s how that looks like if you want to count your open tasks:

Roll-ups for Statistics in Notion

Now that we have this number, we just need to display it in a pretty way. For that, we create a separate property in our Statistics Database. To reduce the confusion later on, I recommend naming all roll-up properties with a # before the name of the thing you’re counting and giving your second property that same name without a #.

Statistics for Notion

Your second property uses the concat operator to combine the number with any phrase you want. This is the template:

concat(“✓ YOUR TEXT BEFORE THE NUMBER ” + format(prop(“#Open Tasks”)) + ” YOUR TEXT AFTER THE NUMBER “)

And this would turn into something like this for open tasks:

concat(“✓ You have a total of ” + format(prop(“#Open Tasks”)) + ” open tasks “)

FAQ

Do I have to use the same statistics everywhere?

No. By creating linked databases for your Statistics Database, you can choose every time which properties you’d like to display. In my task manager (that you can download for free below), I use some short daily stats for the task widget and more comprehensive stats on the main page.

Statistics in Notion with the Checkbox Method
Notion Task Manager Statistics

Is there a way to get statistics for entries that are already in my database?

Yes! The Checkbox Method is fully backwards compatible. To set up statistics for all your existing entries, proceed as follows:

  1. Set up The Checkbox Method as explained above. Create a separate Statistics Database (with the single entry My Stats), create a relation property set to your main database, create a bunch of yes/no questions that return checkboxes and finally, set up your “translate this number into text” formulas.
  2. Go into your main database and select any entry. Press Esc to get the blue selector around the entry. Next, press your keyboard shortcut for Select All (cmd + a on mac or cntrl + a on windows). Now, all entries should be highlighted blue. Rightclick anywhere into that blue selection, go to Edit Property, pick the relation property to the Statistics Database and set it to the single existing entry My Stats.
  3. That’s it. Enjoy your stats.

Can you only gather statistics for one database?

No, you can have statistics for all your databases. Just repeat the above steps for separate use cases.

Even better, sometimes you might want to have statistics from two different databases within one statistic database. In my task manager (download it for free below), My Stats displays information from the task database AND the project database.

Notion Task Manager Statistics

To do so, simply create another relation from the Statistics Database to the second database of choice and start rolling up checkbox fields.

Do you have more Notion Content?

Sure do. It’s an ever growing collection. Check this out:

Got more questions?

Tweet at @mfreihaendig and I will try to get back to you asap.

TL/DR

  1. Set up a dedicated statistics database with one entry
  2. Relate all your entries in the main database for which you want statistics with that one entry
  3. For each statistically relevant information, create a true/false checkbox property in your main database
  4. Use roll-ups in your statistics database to count the number of checkboxes
  5. Use concat formulas to create some pretty text around it
  6. Use a linked database + gallery view to display the statistics everywhere

I want statistics for Notion!

Not in the mood to build this yourself or just want to see how it would look like in action?

Sign up below to receive a fully functional Task Manager in Notion including a pre-loaded statistic function using The Checkbox Method and a task widget for you to paste anywhere else in your workspace.

Plus, you’ll also receive my bi-weekly newsletter where I help you to boost your productivity, craft your life and become a Notion Ninja.

Continue Reading With These Related Posts