Relations & rollups – Notion Help Center (2024)

Relations & rollups – Notion Help Center (1)

In this Article

Have you ever wanted to connect the data between two tables? You're in luck! Notion's relation property is designed to help you express useful relationships between items in different databases 🛠

Jump to FAQs

What is a database relation?

Let's say you have two databases for your theoretical business 😉

  • One that tracks customers

  • One that tracks items purchased

You want to know both which customers bought which items, as well as which items were purchased by which customers. This is a job for relations!

Relations & rollups – Notion Help Center (2)

  • In the two tables above, the columns labeled↗ Items Purchasedand↗ Customersare relation properties, which can be added like any otherdatabase property.

  • Here, when you add an item bought into theCustomersdatabase, the customers who bought them automatically appear in the↗ Customerscolumn in theItemsdatabase.

Example use cases

  • Connect yourdatabase of restaurantswith yourdatabase of neighborhoodsso you can see which restaurants are in which neighborhoods at a glance.

  • Connect your database of meeting noteswith yourdatabase of clientsto provide quick access to the notes relevant to each client.

  • Connect yourdatabase of taskswith yourdatabase of bigger projectsto understand how projects are broken down into tasks, and how tasks contribute to projects.

  • Connect yourdatabase of candidateswith your database of interviewersto keep track of who interviewed whom.

Create a relation

To relate two databases, you need two databases. So let's assume you've made theCustomersandItemsdatabases above for the purpose of this walkthrough.

  • Add a new column/property to yourCustomersdatabase.

  • In the property menu, give it a name in the box provided, likeItems Purchased.

  • ChooseRelationfrom theTypemenu.

  • You'll be asked to find the database you want to create the relation with. You can use the input at the top to search for this database.

Relations & rollups – Notion Help Center (3)

  • You'll see a preview of the relation. In this case, we've created a relation from the Customer database to the Items database.

  • Click the blueAdd relationbutton to finalize the creation of the new relation property.

Relations & rollups – Notion Help Center (4)

Relations & rollups – Notion Help Center (5)

Relations & rollups – Notion Help Center (6)

Tip:To change the database you're connecting to, re-selectRelationas the property type for that particularly property. You'll be prompted to choose a new database.

Two-way relations

Relations are created as one-way by default. But you can easily toggle on a corresponding relation in the destination database.

With two-way relations, the edits work both ways! So if you add a customer to theItemsdatabase in the relation column, the change pops up in yourCustomersdatabase.

  • Follow the above instructions to create a new relation property.

  • Click the toggle that says Show on [name of related database]. In our example, this says Show on Items DB.

  • Give this corresponding relation a name.

  • Below, you'll see a preview of the two-way relation. In this case, we've created a relation from the Customer database to the Items database, and a relation from the Items database to the Customer database.

  • Click the blueAdd relationbutton to finalize the creation of these two new relation properties.

Relations & rollups – Notion Help Center (7)

View and remove related pages

When you create a relation, you're essentially adding Notion pages stored in one database into the property field of another.

  • These pages can be opened and edited like any other! Click on the page in the relation column. Then click on it again in the window that pops up.

  • You can also remove any related page by hovering over and clicking the at the right.

  • You can choose to limit the number of pages that can be included in your relations property – with the option to select 1 page or to have No limit.

  • If you select the option to limit it to 1 page, people using your database will only be able to select 1 page in the relation. This is especially useful for situations where only one page should be related to one another, for example - if only one order number should be associated with each purchase.

Display options for relations

Relations can be displayed on pages in three different ways. To change the display, click on the relation, click Show as and select one of the following:

  • As property: The relation will be displayed at the top of the page, alongside all the page properties.

  • As page section: The relation will be displayed right above the page body, as its own section. Best option if you want the relation to standout.

  • Minimal: The relation will be display right above the page body, but with the content hidden.

Relations & rollups – Notion Help Center (8)

Note: If you want to change a relation from Minimal to another display, click ••• -> Customize page.

Relate a database to itself

Let's say you want items in the same database to have relationships with each other. For example, you have a tasks database and you want each task to relate to other tasks.

  • Start off by creating a new relation.

  • Then search for and choose the database you're currently working in.

  • You'll now see that the database is related to This database.

Relations & rollups – Notion Help Center (9)

Just as with relations between two databases, you can choose to make this a one-way relation or two-way relation.

  • To make it a two-way relation, toggle on Separate properties. You'll see a second property show up.

Rollups

Rollups help you aggregate data in your databases based on relations. Going back to our customers and items example above, let's say you wanted to know how much each customer spent based on what they bought.

  • First, create the relation so you know who bought what.

  • Add a new column/property and chooseRollupfrom theProperty typemenu. Give it a descriptive name.

Relations & rollups – Notion Help Center (10)

  • Clicking on any cell in the rollup column will bring up a new menu asking you for:

    • The relation property you want to roll up.

    • The property of those related pages you want to roll up.

    • The calculation you want to apply to them.

  • So, for our example, you'd choose to roll up the relation propertyItems Purchasedand thePrice property within those pages. Then you'd chooseSumas the calculation.

    • Doing this adds up the prices of each item related to a customer's name, giving you the total dollars they spent in your rollup column.

Relations & rollups – Notion Help Center (11)

Rollup types

There are 17 different calculations you can apply as a rollup. Here are all of them:

  • Show original: This just shows all related pages in the same cell. It's the same as the relation property itself.

  • Show unique values: This shows each unique value in the selected property for all related pages.

  • Count all: Counts the total number of values in the selected property for all related pages.

  • Count unique values: Counts the number of unique values in the selected property for all related pages.

  • Count empty: Counts the number of related pages with an empty value for the property selected. So, if one item a customer bought didn't have a price and that was the property selected, the rollup column would say 1.

  • Count not empty: Counts the number of related pages with assigned values for the property you selected.

  • Percent empty: Shows the percentage of related pages with no value in the property you selected.

  • Percent not empty: Shows the percentage of related pages with a value in the property you selected.

These rollup calculations are only available forNumberproperties:

  • Sum: Computes the sum of the numeric properties for related pages (like above).

  • Average: Computes the average of the numeric properties for related pages.

  • Median: Finds the median of the numeric properties for related pages.

  • Min: Finds the lowest number in the numeric property for related pages.

  • Max: Finds the highest number in the numeric property for related pages.

  • Range: Computes the range between the highest and lowest numbers in the numeric property for related pages (Max -Min).

These rollup calculations are only available forDateproperties:

  • Earliest date: Finds the earliest date/time in the date property for all related pages.

  • Latest date: Finds the latest date/time in the date property for all related pages.

  • Date range: Computes the span of time between the latest and earliest dates in the date property for related pages.

Aggregate rollups

In both tables and boards, you can apply calculations to your rollup column to get a sense of sums, ranges, averages, etc. for your entire database.

  • Let's say you want to find the total money spent by all customers in our example.

  • At the bottom of your Customers table, under your rollup column, clickCalculate.

  • ChooseSumto add all the values in that column together and get a grand total.

Relations & rollups – Notion Help Center (12)

FAQs

Can I export or import relations?

When you export a relational database as a CSV file, the relation properties will export as plain text URLs. For now, you can't re-import that CSV back into Notion to re-establish the relations with other databases.

Can I duplicate a database with a relation?

Yes, but the following will happen which can be kind of confusing:

If you create a copy of the Customers database in the example above, you'll see a new relation property automatically appear in the Items database.

This happens because relations sync two ways in Notion. When a database is duplicated, you also duplicate its relationships with other databases. You'll get the hang of it! 💪

Can I rollup a rollup?

Unfortunately not, as this could create unintended loops. We recommend sticking to rolling up other properties😊

Relations & rollups – Notion Help Center (2024)

FAQs

How do you use rollup and relation in Notion? ›

How to set up and use rollups in Notion?
  1. Identify or create at least two databases in Notion. ...
  2. Create a new column and edit it's property type. ...
  3. Select the right database. ...
  4. Add data for the other database. ...
  5. Create a new column to add the rollup. ...
  6. Select the “Relation” ...
  7. Identify the column to import. ...
  8. Set the Rollup function.

What is the difference between relation and rollup? ›

Relations allow you to connect pages from one database to another. Rollups allow you to pull specific properties from a database into another database.

How to filter relations in Notion? ›

Filtering the Relation Property

Add Filter: Click on the "Filter" option usually located near the top-right corner of the database view. Select Relation Property: In the filter options, choose the relation property you want to filter by. This will display a list of related items.

What do relations do in Notion? ›

Relations in Notion allow you to establish a link between two different types of knowledge (aka databases), enabling you to view and access data from one database in the context of another.

Can you group by rollup Notion? ›

You can apply grouping to views in any format except Calendar . Within the view's ••• menu, you'll find the Group option, where you can specify any grouping property except a Rollup . Depending on the property type of your grouping property, Notion may display additional options.

What are rollups in Notion? ›

Rollups help you aggregate data in your databases based on relations. Going back to our customers and items example above, let's say you wanted to know how much each customer spent based on what they bought. First, create the relation so you know who bought what.

What does it mean to rollup data? ›

Roll-up data is the term given to the data that has been summarized. Before any raw data is purged, the minimum, maximum, and average values are calculated and can be preserved in several ways.

What is the difference between L2 and rollup? ›

Rollups are an L2 scaling solution. At the most basic level, a rollup L2 solution is responsible for "rolling up" transactions by batching them before publishing them to the L1 chain, usually through a network of sequencers. This mechanism could include thousands of transactions in a single rollup.

How do I make my Notion search better? ›

Refine your search results

When you search for something, you'll see the option to sort and filter from inside the search window so you can quickly find what you're looking for. You can sort by: Best Matches (default): Shows the most relevant results.

Can you combine two databases in Notion? ›

Combining databases in Notion involves exporting and importing data or using the Relation function, and for multiple databases, creating a master database.

How do you link two databases in Notion? ›

To add a linked database to a page, type out /linked , then hit the Enter key. You'll be prompted to search for the database you'd like to link. Select it once it shows up, then either copy an already existing view of your database, or create a brand new view.

What makes Notion so special? ›

It offers a clean and open surface for thinking, writing, and planning. Customization is key, allowing users to create pages and arrange them as needed. Collaboration is seamless, with the ability to share work, make comments, and mention colleagues.

What do most people use Notion for? ›

Notion Specs

You can use it to take simple notes or to manage projects using databases with a variety of views. Notion can be as simple or as complex a tool as you want, but it has a steep learning curve—most people can't go from taking simple notes to managing databases in an afternoon.

How do I have two databases in Notion? ›

How To Create Notion Relations To Multiple Databases
  1. Navigate to or create your main database.
  2. Create a new property.
  3. Select 'Relation' as the property type.
  4. Create another database.
  5. Repeat the process and link to another database.
  6. Reference objects from both databases.
Jan 1, 2024

How to connect two pages in Notion? ›

In-line in a paragraph

@ commands - Type @ , then start typing the name of the page you want to link. Select the page you'd like to link in the dropdown that appears. This method also allows you to mention a date, notify another person in your workspace, or create a reminder.

Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6163

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.