TL;DR: To set up a Notion database with linked properties and formulas, create two related databases, add a relation property between them, then add a formula property that pulls or calculates data from the linked records. Use rollup properties to aggregate numeric data across relations, and write simple formulas like `prop(“Price”) * prop(“Quantity”)` for real-time math.
Step 1: Create Your Two Databases
Start by creating two separate databases in Notion. For example, “Products” (with properties: Name, Price, Stock) and “Orders” (with properties: Order ID, Quantity, Date). You can make them as full pages or inline tables. Ensure each has a primary text property (like Title) — this is mandatory for relations to work.
If you want to dig deeper, check out our guide on **Banish Gray for Months: Long-Lasting Hair Color That Won’t.
Step 2: Add a Relation Property
Open the “Orders” database. Click the “+” icon in the properties row, choose “Relation,” and select the “Products” database. This creates a two-way link. In the relation settings, you can allow multiple products per order (or restrict to one). Each order row will now show a selectable list of products. Click into any order, add a product, and you’ll see the same relation appear on the product’s page.
Step 3: Add a Rollup Property (for Aggregates)
Now, inside “Orders,” add a new property. Choose “Rollup.” Set the relation to “Products,” then select a property from that database (e.g., “Price”). For the calculation, pick “Sum,” “Average,” or “Max.” This gives you a live aggregate — for example, total price of all products in that order. Rollups are essential when you need numbers from linked rows.
Step 4: Write Your First Formula
Add another property, choose “Formula.” Use simple syntax: prop("Price") * prop("Quantity") to get line totals. For text, use prop("Product Name") + " - " + format(prop("Date")). For conditional logic, try if(prop("Stock") < 10, "Low", "OK"). Click "Save" — the formula updates instantly for every row.
Step 5: Combine Relations and Formulas for Dashboards
Create a third database (e.g., "Customers"). Add a relation from "Orders" to "Customers." Then, in "Customers," add a rollup that sums all order totals (using the formula property from Step 4). This gives per-customer revenue without manual entry. Use formulas like prop("Order Total") / 100 for currency conversion or round(prop("Tax") * 100) / 100 for precision.
Pro Tips
Always name your properties clearly (no spaces if possible, or use underscores) to avoid formula errors. Use `format()` to convert numbers to text in concatenations. Remember that rollups only work one level deep — if you need a rollup of a rollup, you’ll need an intermediate database. Test formulas on a single row first, then duplicate.
FAQ
Q: Why can’t I see my rollup property in a formula?
A: Rollups cannot be referenced inside formula properties directly. Instead, use a relation to the source database and pull the raw number from there, or create a separate formula property in the source database that computes the value, then roll up that formula result.
Q: How do I make a relation mandatory for new rows?
A: Click the relation property’s settings (the three dots next to its name), select "Edit property," and toggle "Require a value" to on. This forces users to link at least one item before saving the row.
Q: Can I use formulas to compare data from two different relations?
A: Yes, but you’

Leave a Reply