Skip to main content
FLO.W 思流Notion Formulas
Formula Snippets

Relation Statistics Formulas

Use Notion formulas to work with relation properties, replace parts of rollups, calculate multi-level relations, and summarize projects.

This page collects formulas related to connected databases. Use it for project, task, customer, and other multi-database structures.

If your formula involves relation properties, rollup replacement, or multi-level relation statistics, start here.

ScenarioMain functions used
Read related pagesfirst(), prop()
Replace parts of rollupsmap(), filter(), sum()
Multi-level relation statisticsmap(), flat(), length()

Relation properties are usually lists

Even if your workflow only relates to one page, formulas often need to treat the relation as a list.

Common pattern:

prop("Project").first()

Access the status of the first related project:

prop("Project").first().prop("Status")

To avoid empty-value errors, check first:

if(  empty(prop("Project")),  "No project",  prop("Project").first().prop("Status"))

Replace parts of rollups directly with formulas

In the past, many statistics depended on rollups. After Formulas 2.0, related pages can often be processed directly inside formulas.

Total tasks:

prop("Tasks").length()

Completed tasks:

prop("Tasks").filter(current.prop("Status") == "Completed").length()

Total task hours:

prop("Tasks").map(current.prop("Hours")).sum()

Highest priority score:

prop("Tasks").map(current.prop("Priority Score")).max()

Multi-level relations

For example: customer -> project -> task.

Get all tasks under all projects for one customer:

prop("Project").map(current.prop("Tasks")).flat()

Count all completed tasks:

prop("Project")  .map(current.prop("Tasks"))  .flat()  .filter(current.prop("Status") == "Completed")  .length()

Note: multi-level relation formulas can easily run into performance issues or formula depth limits. It is better to split the logic with helper properties.


To use these formulas directly in task reminders, project progress, note heatmaps, and reports, continue with FLO.W Notion Template.

Last updated on