Rollups help you aggregate data in your databases based on relations.
Going back to our customers and items example in database relations, let's say you wanted to know how much each customer spent based on what they bought.
Rollup
from the Property type
menu. Give it a descriptive name.Items Purchased
and the Price
property within those pages. Then you'd choose Sum
as the calculation.
Doing this adds up the prices of each item related to a customer's name, giving you the total dollars they spent in your rollup column.
There are 17 different calculations you can apply as a rollup. Here are all of them:
Show original
: This just shows all related pages in the same cell. It's the same as the relation property itself.Show unique values
: This shows each unique value in the selected property for all related pages.Count all
: Counts the total number of values in the selected property for all related pages.Count unique values
: Counts the number of unique values in the selected property for all related pages.Count empty
: Counts the number of related pages with an empty value for the property selected. So, if one item a customer bought didn't have a price and that was the property selected, the rollup column would say 1.Count not empty
: Counts the number of related pages with assigned values for the property you selected.Percent empty
: Shows the percentage of related pages with no value in the property you selected.Percent not empty
: Shows the percentage of related pages with a value in the property you selected.