How to Filter a Database by a Related Property
🔍 WiseChecker

How to Filter a Database by a Related Property

You want to filter a Notion database by a property that belongs to a linked database. For example, you have a Tasks database linked to a Projects database, and you want to show only tasks whose project is marked as High Priority. The standard filter options in Notion do not directly expose properties from the related database. This article explains how to use rollups, formulas, and linked database views to achieve this filter.

A related property is a field from a database that is connected via a relation column. Notion cannot filter on that field directly because it lives in a different table. You must bring the value into the current database using a rollup or formula column. Once the value is present, you can apply a filter as usual.

This guide covers three methods: creating a rollup column to pull the related value, using a formula to extract text or numbers from the relation, and filtering a linked view of the related database. Each method works for different scenarios. Choose the one that matches your setup.

Key Takeaways: Filtering a Notion Database by a Related Property

  • Add a rollup column in the source database: Pulls a text, number, or date value from the related database so you can filter on it
  • Use a formula column with prop(“Relation Name”).prop(“Property Name”): Extracts a related property without creating a separate rollup column
  • Filter a linked view of the related database: Shows only related items that match a condition, without modifying the source database

Understanding Why Related Properties Are Not Directly Filterable

In Notion, a relation column creates a connection between two databases. Each row in the source database can link to one or more rows in the target database. The relation itself does not store any data from the target row. It only stores the link. When you open the filter menu for a database, Notion lists only columns that exist in that specific database. Columns from the related database are not available because they belong to a different table.

To work around this limitation, you need to bring the related value into the source database. Notion provides two column types for this purpose: rollup and formula. A rollup column can aggregate or display a value from a related row. A formula column can reference properties from a relation using dot notation. For example, prop("Project").prop("Priority") returns the Priority value of the linked project. Once the value exists in a column, you can filter on it like any other property.

This approach works for text, number, select, multi-select, date, and checkbox properties. It does not work for properties that are themselves relations or rollups from the target database. In those cases, you may need to create multiple rollup layers.

Method 1: Using a Rollup Column to Filter by a Related Property

A rollup column is the most common way to bring a related property into the current database. It can display a single value or an aggregation such as count, sum, or average. For filtering, you typically want the raw value, not an aggregate. Use the Show original rollup type.

  1. Open the source database
    Navigate to the database that contains the relation column. This is the database you want to filter.
  2. Add a new rollup column
    Click the + button in the last column header. Choose Rollup from the property type list.
  3. Configure the rollup
    In the column settings, set Relation to the relation column that links to the target database. Set Property to the property you want to pull (for example, Priority). Set Calculate to Show original.
  4. Apply a filter using the rollup column
    Click the filter icon in the top-right corner of the database. Add a filter condition. Select the new rollup column. Choose the operator and value. For example, Priority is High.
  5. Test the filter
    Verify that only rows with the matching related property appear. If the rollup shows nothing, check that the relation is correctly configured and that the target property has a value.

Method 2: Using a Formula Column to Extract a Related Property

A formula column can reference a property from a related row directly. This avoids adding a separate rollup column. It works best when the relation links to a single row. If the relation allows multiple links, the formula will return an error or an empty value.

  1. Add a formula column
    Click the + button in the last column header. Choose Formula.
  2. Enter the formula
    Type prop("Relation Name").prop("Property Name"). Replace Relation Name with the exact name of your relation column. Replace Property Name with the exact name of the property you want to filter on. For example: prop("Project").prop("Priority").
  3. Apply a filter using the formula column
    Click the filter icon. Add a condition using the formula column. Choose the operator and value. For example, Formula is High.
  4. Handle empty or multiple relations
    If a row has no relation, the formula returns an empty value. If the relation links to multiple rows, the formula will return an error. In that case, use a rollup instead.

Method 3: Filtering a Linked View of the Related Database

If you do not want to modify the source database, you can create a linked view of the related database and apply the filter there. This method shows only the related items that match a condition, rather than filtering the source rows.

  1. Create a linked view of the related database
    In the source database, type /linked view of database. Select the target database. A new block appears showing that database.
  2. Apply a filter to the linked view
    Hover over the linked view block. Click the Filter button. Add a condition on any property in the target database. For example, Priority is High.
  3. Use the linked view as a reference
    The linked view now shows only the related items that match the filter. This does not affect the source database rows. You can place this view on a dashboard or page for quick access.

Common Issues When Filtering by a Related Property

Rollup column shows no value

The most common cause is that the relation column does not link to any row. Check that each row in the source database has a relation set. If the relation is empty, the rollup will be empty. Also verify that the target property exists and has a value. If the property name changed after the rollup was created, the rollup may break. Edit the rollup column and reselect the property.

Formula returns an error

A formula using dot notation will return an error if the relation column allows multiple links. Notion does not support this syntax for multi-select relations. Switch to a rollup column with Show original or use a rollup with aggregation such as Join to combine values. Another cause is a typo in the property name. Property names are case-sensitive. Check that the name in the formula matches exactly.

Linked view filters do not update when source data changes

A linked view is a live view of the target database. It updates automatically when data in the target database changes. If the view appears stale, refresh the page or close and reopen the linked view block. If the filter condition references a property that was deleted, the filter will stop working. Edit the filter and select a valid property.

Rollup vs Formula vs Linked View: Comparison

Item Rollup Column Formula Column Linked View
Purpose Display a value from a related row Extract a value using dot notation Show filtered related items in a separate block
Works with multi-relation Yes, with aggregation No, returns error Yes, shows all related items
Modifies source database Yes, adds a column Yes, adds a column No, adds a block only
Filter on the result Yes Yes Yes, on the target database
Performance Fast for small databases Fast Fast
Best use case Single or multiple relations, need aggregation Single relation, no aggregation needed Quick filter without altering the source database

You can now filter any Notion database by a property from a related database using rollups, formulas, or linked views. Start by identifying the relation column and the target property. If you need to filter by multiple related properties, create a separate rollup or formula column for each. For advanced filtering, combine a rollup column with a database view and save it as a template for your team.