When you build a database in Notion, relation properties let you link records across tables. Users often want to sort a relation column by a value inside the linked record, such as sorting a list of tasks by the due date of their related project. Notion does not allow sorting a relation property by a sub-property of the linked database. This article explains the technical limitation that prevents this operation and provides practical workarounds to achieve similar results.
Key Takeaways: Sorting Relation Properties by Sub-Properties
- Relation properties point to whole records: Notion treats a relation as a reference to an entire row, not to individual fields inside that row.
- Sort operates on the relation column itself: Notion can sort by the relation count or the rollup value, but not by a field inside the linked record.
- Use a rollup property as a sort workaround: Create a rollup that pulls the target sub-property into the current database, then sort by the rollup column.
Why Notion Cannot Sort a Relation by a Sub-Property
Notion stores each relation as a reference to a specific row in another database. When you view a relation column in a table, you see the name of the linked record. The sort feature in Notion works on the values that appear directly in the column of the current database. Because the relation column contains a reference rather than the actual data from the linked row, Notion cannot reach into the linked database to extract and sort by a sub-property.
This is by design. Notion’s data model separates the current database from the linked database. The sort engine only sees the identity of the linked record, not its fields. The same limitation applies to filter, group, and formula properties that try to access sub-properties directly. Notion provides rollup properties as the intended way to bring sub-property values into the current database.
The Technical Root Cause
Every Notion database is an independent data store. A relation property stores a list of page IDs from the target database. When you apply a sort to the relation column, Notion queries the current database and tries to order rows by the values in that column. The values are page IDs, not the sub-properties of those pages. Notion does not perform a join between the two databases at sort time. This is a deliberate architectural choice to keep performance predictable and avoid circular dependencies.
Steps to Sort by a Sub-Property Using a Rollup
The only supported method to sort a relation column by a sub-property is to create a rollup property in the current database. A rollup pulls a value from the linked record and displays it in the current row. You can then sort the current database by the rollup column.
- Identify the sub-property you need
Open the linked database and note the exact name of the property you want to sort by. For example, if you want to sort tasks by the project due date, the linked database must have a Date property called “Due Date.” - Create a rollup property in the current database
In the current database, click the + button in the table header to add a new property. Select “Rollup” from the property type menu. Name the rollup, for example “Project Due Date.” - Set the relation and the target property
In the rollup configuration, choose the relation property that links to the other database. Then select the sub-property you want to pull, such as “Due Date.” Notion will display the value from the linked record in the rollup column. - Choose the rollup aggregation
If the relation links to multiple records, you must pick an aggregation method. For a single relation, select “Show original.” For multiple relations, options include “Show original,” “Count,” “Sum,” “Average,” “Min,” “Max,” “Earliest date,” and “Latest date.” Choose the one that matches your sorting goal. - Sort by the rollup column
Click the header of the new rollup column and select “Sort ascending” or “Sort descending.” The rows will now order based on the sub-property value from the linked records.
If Notion Still Does Not Sort as Expected
Rollup Shows No Value or Shows an Error
If the rollup column displays “No value” or an error, check that the relation property is correctly linked to a record. A relation that points to an empty page or a page without the target sub-property will produce an empty rollup. Ensure every related record has a value in the sub-property you are pulling.
Sort Order Appears Random After Using a Rollup
When a relation links to multiple records and you use an aggregation like “Sum” or “Latest date,” the sort will use the aggregated value. If the linked records have identical sub-property values, the sort order among those rows may appear random. To get a deterministic sort, ensure the sub-property values are unique or use a single relation per row.
Rollup Aggregation Changes the Data You Want to Sort
If your relation links to multiple records and you need to sort by a specific sub-property from only one of them, the rollup aggregation may distort the result. For example, “Sum” adds all values, which may not match the specific record you care about. In this case, restructure your databases to use a single relation per row, or use a formula to extract the desired value from the rollup.
Relation Sort Limitations vs Workarounds
| Item | Direct Sort on Relation Column | Sort via Rollup Property |
|---|---|---|
| Sort by sub-property | Not supported | Supported with rollup |
| Sort by relation count | Supported by adding a count rollup | Supported |
| Sort by linked record name | Supported if the relation shows the page title | Not needed |
| Sort by multiple sub-properties | Not supported | Create separate rollups for each sub-property |
| Sort with multi-select relations | Not supported | Use rollup aggregation (Min, Max, Earliest, Latest) |
Notion relation properties cannot be sorted by sub-properties because the sort engine only sees page references, not the content of linked records. Creating a rollup property that pulls the desired sub-property into the current database is the supported workaround. Use the rollup column as your sort key. For databases with multiple related records, choose the appropriate aggregation method to get meaningful sort results.
After implementing this workaround, test the sort order by adding new records with different sub-property values. If you need to sort by multiple sub-properties, create a separate rollup for each one and apply multi-level sorting in the database view. As an advanced tip, you can combine a rollup with a formula property to transform the pulled value before sorting, such as formatting a date as a number for custom ordering.