Nested formulas, also known as formula on formula, provide the flexibility to reference an existing formula within another calculation. This approach helps you build complex logic by layering simple components.
The following graphic illustrates the process of defining a specific formula and subsequently referencing it within a second formula.
This formula is amount - fee
This formula uses the above formula inside it: amount - fee > net amount. When saved and used, it will return an answer of "true" or "false".
Once created, these formulas function as columns and will appear as suggestions within the chart builder. You can create these layers without any restriction on nesting depth.
Trends AI is designed to prevent the creation of invalid formulas, including loops (cyclic dependencies) or inconsistent aggregation logic. To support a seamless experience, formulas feature dependency awareness.
For example, the system will prevent you from deleting a formula if it is currently nested inside another. This awareness also ensures that you do not accidentally break dependent calculations while editing, which is especially helpful when changing data types.
Nesting allows you to encapsulate and break down complex logic into manageable parts. This encourages team collaboration, as one person can create small, purposeful formulas that others can then build upon, effectively minimizing the need for duplicate work.


