Beli Löw
There are two easy ways to count linked entries:
- With a formula.
- By setting a rollup on the link and counting the entries.
Counting Linked Entries with a Formula
You can also display the property as a “Page Section.”
To do this, click on Show as
→ Page Section
for the property.
To count how many entries are linked from a relation, you can use the following formula.
Simply put: The formula counts the number of commas ,
between the entries.
In this example, we want to calculate the occupancy of office rooms based on the linked employees, which are sourced from the employee database.
You need the following database fields to perform the calculation.
Capacity - Type: Number
for the room's capacity
Employees - Type: Relation
to the employee database
Number of Employees - Type: Formula
to calculate the linked employees
if(not empty(
prop("Mitarbeitende")), length(replaceAll(prop("Mitarbeitende"), "[^,]", "")) + 1, 0
)
Free Spaces - Type: Formula
For calculation Capacity
- Number of Employees
prop("Kapazität") - prop("Anzahl MA")
Counting linked entries with a rollup.
Add a rollup to the existing relation and count the entries.
Create Rollup
on existing relation- For
Calculate
, selectCount All
Questions about the formulas? Feel free to send us an email at hi@notioneers.ch.
Beli Löw
Beli is an IT project manager, tool enthusiast, entrepreneur and has organized his whole life with Notion. His news sources are release notes from tools. There is (almost) no feature or shortcut that he does not know.
Join us Today: and become a Notion know-all
Wouldn’t you like to know more?
Keep Reading…