Sub-entry formulas & Scale values
Calculate over an entry's parts, or scale several number fields together from a saved reference amount.
Use a Formula to calculate over sub-entries. Use Scale values to change several number fields together. Both work with any collection: ingredients, materials, workout sets or other things you track.
Calculate over sub-entries
Add Formula from Calculations & controls and type:
sum(children("Food"), "Calories")
This adds Calories from the current entry's direct Food sub-entries. Use avg, min, max or count for another calculation. The editor accepts current names and stores stable references, so renaming the collection or field does not break the formula.
The result updates when its inputs change. It stores no extra numeric value, so displaying a parent total does not add another copy of its children's values to your tracked totals. Existing Rollup fields are converted to equivalent formulas as part of the data rollout.
Scale several values together
Add Scale values from Calculations & controls. Choose the number fields it controls and the unit: Servings or Grams. Changing its amount scales all selected values together.
For example, a reference serving with 146 kcal and 17 g protein becomes 292 kcal and 34 g protein at two servings. Under the amount, the grey reference line shows where those numbers came from: 1 serving = 146 kcal Calories, 17 g Protein. The reference comes from values you, a preset or the AI entered; the control multiplies them.
Grams uses a reference per 100 g. Editing a controlled field directly updates the stored reference so the next change remains consistent. Each number field can belong to at most one Scale values control.
The scaled numbers are the real tracked values, so charts and totals use the amount you entered.