Operators come first
Operators handle the basic structure of most formulas.
Use operators when the business rule is simple. Add functions only when they make the formula easier to read.
Logical functions and branches
Logical functions help a formula react to conditions. Common uses include:- switching behavior before and after the
Last actual date - returning flags such as
1and0 - routing one variable to different outputs depending on context
Math and statistical helpers
Math and statistical functions keep formulas shorter and easier to audit. Common examples include:sum()for totalsavg()for average valuesround()for display-ready outputsabs()for absolute valuesmin()andmax()for bounds and thresholds
Time-aware helpers inside formulas
Some of the most important formula inputs are time-aware. These include values such asmonth, quarter, year, timestep, and lastActualDate.
Use them when the business rule depends on:
- seasonality
- period cutoffs
- fiscal period behavior
- rolling logic that should keep working after each close
Financial-style calculations
Oculon formulas often support financial-style logic such as rate-based planning, cash flow behavior, return logic, or forecast ramps. Even when those formulas are advanced, the same rule applies: keep the business meaning obvious. In practice, this usually means:- separate the input drivers from the final output
- use helper variables for intermediate steps
- review the result at both detail level and summary level
Choose the smallest useful function
A short, obvious formula is usually better than a clever one. Prefer this approach:- start with direct arithmetic if it expresses the rule clearly
- add a function when it removes repetition or ambiguity
- move complex logic into helper variables before the formula becomes hard to review

