Functions Reference
All available formulas, operators, and keywords by category.
Arithmetic
Subtracts the right value from the left value.
Syntax
Arguments
- aMinuend
- bSubtrahend
Flips the sign of a value, turning a positive number into a negative one (or vice versa) for each time period.
Syntax
Arguments
- aValue to negate
Multiplies two values.
Syntax
Arguments
- aMultiplicand
- bMultiplier
Divides the left value by the right value.
Syntax
Arguments
- aDividend
- bDivisor
Raises the left value to the power of the right value.
Syntax
Arguments
- aThe base number
- bThe exponent
Adds two values.
Syntax
Arguments
- aLeft operand
- bRight operand
It does nothing, just a structural identify operation, leaves the value unchanged.
Syntax
Arguments
- aValue
Finds the absolute value of a series for each time period.
Syntax
Arguments
- SeriesThe series you want to find the absolute value of.
Multiplies provided series together for each time period.
Syntax
Arguments
- SeriesOptionalThe series you want to multiply.
Calculates the product of all values across your timeline. You can filter the series with period markers using functions like is('Historical').
Syntax
Arguments
- SeriesThe series of values you want to multiply.
- FilterOptionalAn optional boolean condition. The engine will only multiply the periods where this is true. E.g., if you use is('Historical') here, the engine will only calculate the product of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
Rounds a series to a specific number of decimal places for each time period.
Syntax
Arguments
- SeriesThe series you want to round.
- PlacesOptionalThe number of decimal places to round to. Default is 0.
Calculates the square root of a series for each time period.
Syntax
Arguments
- SeriesThe series you want to find the square root of.
Calculates the sum of multiple series for each time period.
Syntax
Arguments
- SeriesOptionalThe series you want to sum.
Sums all the values across your timeline. You can filter the series with period markers using functions like is('Historical').
Syntax
Arguments
- SeriesThe series you want to sum.
- FilterOptionalAn optional boolean condition. The engine will only sum the periods where this is true. E.g., if you use is('Historical') here, the engine will only sum the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
Comparison
Stands for 'Not Equal'. Check if two values are different. Type ! then =.
Syntax
Arguments
- aLeft value
- bRight value
Check if the left value is less than the right value.
Syntax
Arguments
- aValue to check
- bThreshold
Check if the left value is less than or equal to the right value.
Syntax
Arguments
- aValue to check
- bThreshold
Stands for 'Equal'. Check if two values are equal. Type = twice (no space between them).
Syntax
Arguments
- aLeft value
- bRight value
Check if the left value is greater than the right value.
Syntax
Arguments
- aValue to check
- bThreshold
Check if the left value is greater than or equal to the right value.
Syntax
Arguments
- aValue to check
- bThreshold
Date
Returns the exact number of days within the current time period. Accounts for varying month lengths and leap years.
Syntax
Returns month (1-12) of the current time period, or the month of a provided date.
Syntax
Arguments
- dateOptionalOptional date series.
Returns the quarter (1-4) of the current time period, or the quarter of a provided date.
Syntax
Arguments
- dateOptionalOptional date series.
Returns the year of the current time period, or the year of a provided date.
Syntax
Arguments
- dateOptionalOptional date series.
Returns the fraction of a full year that the current time period represents. For example, a single month will return approximately 0.083.
Syntax
Financial
Calculates the Compound Annual Growth Rate (CAGR) of a series over your timeline. Automatically accounts for exact days between the first and last valid periods.
Syntax
Arguments
- SeriesThe series you want to evaluate.
- FilterOptionalAn optional boolean condition. E.g., if you use is('Historical') here, the engine will only calculate CAGR across the historical periods.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. If you leave this blank, the result will be placed in the very first period.
Calculates the annualized internal rate of return across your timeline. Automatically handles exact period dates and accounts for leap years.
Syntax
Arguments
- ValuesThe cash flow series you want to calculate the IRR for.
- FilterOptionalAn optional condition to include only specific periods. The engine will only calculate using periods where this is true. E.g., if you use is('Forecast') here, it will calculate IRR using only the cash flows within the Forecast phase. If you leave this blank, it evaluates the entire timeline.
- Valuation PeriodOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period. Unlike xnpv, where you place this result does not affect the calculated IRR, because the underlying math cancels out!
Calculates the net present value of a cash flow series across your timeline. It automatically handles exact period dates and accounts for leap years.
Syntax
Arguments
- RateThe annualized discount rate to apply. Just like Excel, the engine applies this rate correctly regardless of your timeline's frequency (e.g., monthly vs. annual).
- ValuesThe cash flow series you want to discount.
- FilterOptionalAn optional condition to include only specific periods. The engine will only calculate using periods where this is true. E.g., if you use is('Forecast') here, it will calculate NPV using only the cash flows within the Forecast phase. If you leave this blank, it evaluates the entire timeline.
- TimingOptionalDefines when cash flows happen within each period: 'start', 'mid' (middle of the period), or 'end'. If you leave this blank, cash flows are assumed to hit at the end of the period.
- Valuation PeriodOptionalDefines Time Zero for your valuation. The engine will discount all cash flows back to this specific period. You can pin it using conditions like is_last('Historical'). If left blank, it defaults to discounting back to the very first period on your timeline.
Keyword
Represents an empty or missing value. Useful for clearing data or conditional checks.
Syntax
References the current variable itself. Useful in functions like prev().
Syntax
Lifecycle
Performs a discrete convolution of an inflow series with a distribution curve.
Syntax
Arguments
- InflowThe sequence of new inputs for each period.
- CurveThe curve applied to each inflow. It represents age or duration, not calandar dates.
- FilterOptionalAn optional mask to pause the new inflows.
Calculates how your capital investments lose value over time. It takes your capital expenditures (CapEx) and spreads the costs out across their useful lifespan, you can choose between Straight Line (SL) or Double Declining Balance (DDB) methods.
Syntax
Arguments
- CapExThe amount of money spent on new capital assets in each period. You can also enter negative numbers to represent selling or disposing of assets.
- Useful LifeHow long the asset is expected to last, measured in periods. It tracks each investment separately. If you enter a $10k CapEx in month one with a 5-period life, and a $20k CapEx in month two with a 10-period life, it remembers both groups and depreciates them on their own independent schedules.
- MethodOptionalHow you want to calculate the drop in value. Choose SL for Straight Line or DDB for Double Declining Balance (faster drop early on). If you leave this blank, it defaults to SL.
- SalvageOptionalThe estimated resale value of the asset at the end of its useful life. The depreciation will stop at this amount. This is absolute dollar amount, not percentage. Defaults to 0.
- FilterOptionalAn optional switch to ignore new investments. If this is 0 (false) for a given period, any CapEx entered right then is ignored. However, your older assets will continue to depreciate normally.
Runs off an existing baseline or historical balance over time. This is the perfect companion to the cohort function: use runoff to decay your existing mature portfolio from the moment your actuals end, and use cohort to track all new additions from that point forward.
Syntax
Arguments
- BalancesThe series containing your existing balances (e.g., your historical active users).
- RetentionThe retention curve over time. This represents cohort age, not calendar dates. The first value represents the start of the runoff, the second value is the retention rate one period after the start of the runoff, and so on. Retention curve always starts from your very first time period, regardless of when your runoff starts.
- AnchorTells the engine where the runoff should start. For example, passing is_last('Historical') ensures the runoff anchors exactly to the final historical period.
Converts a churn curve into a cumulative retention curve. You can input negative churn rates, this is useful if you are modeling Net Revenue Retention.
Syntax
Arguments
- Harzard CurveThe churn curve over time. This represents cohort age, not calendar dates. The value at period 1 is the churn rate for age 1, period 2 for age 2, etc.
Logical
Stands for 'Not'. It flips a condition's state, turning true into false and false into true. It is very handy for excluding things, like using !is('Historical') will exclude all historical periods.
Syntax
Arguments
- aCondition to invert
Stands for 'And'. It combines two conditions and return true only if both are met. For example, you can check things like if a period is('Historical') && Revenue > 0
Syntax
Arguments
- condition aLeft condition
- condition bRight condition
Stands for 'or'. It combines two conditions and return true if any one of them is met.
Syntax
Arguments
- condition aLeft condition
- condition bRight condition
Evaluates a logical condition, return one result if the condition is true, and another if it's false.
Syntax
Arguments
- ConditionThe logical test you want to evaluate.
- Value if TrueThe result to return when the condition is met.
- Value if FalseOptionalThe result to return when the condition fails.
Evaluates a formula and catches any errors (like division by zero). If an error occurs, the Value if Error branch you defined will be used.
Syntax
Arguments
- ValueThe primary expression you want to evaluate.
- Value if ErrorThe fallback value or expression if the primary expression results an error.
Evaluates a sequence of conditions, returns the result when the first condition is met. This function can be used as an alternative to nesting multiple 'if' functions.
Syntax
Arguments
- Condition and Value PairsAlternating conditions and their corresponding results (e.g., condition 2, result 1, condition 2, result 2).
Lookup
Checks if a period belongs to a specific marker (like 'Historical' or 'Forecast'). It returns a 1 (true) in periods that match, and a 0 (false) where they don't, making it perfect for turning calculations on or off. You can easily combine these using standard operators like `!` (not), `&&` (and), and `||` (or) to build fully dynamic models. For example, `!is('Historical')` or `is('Lease-up') && is('Operational')`.
Syntax
Arguments
- MarkerThe name of the marker you want to check for (e.g., 'Historical').
Finds the very first period of your timeline, or the first period of a specific marker. It returns a 1 (true) in that exact period and a 0 (false) everywhere else.
Syntax
Arguments
- MarkerOptionalOptional. The name of the marker to search within. If you leave this blank, it finds the very first period of your entire timeline.
Finds the very last period of your timeline, or the last period of a specific marker. It returns a 1 (true) in that exact period and a 0 (false) everywhere else.
Syntax
Arguments
- MarkerOptionalOptional. The name of the marker to search within. If you leave this blank, it finds the very last period of your entire timeline.
Grabs a specific value from a series based on a condition you set, and make it available to the entire timeline and downstream calculations.
Syntax
Arguments
- SeriesThe series containing the value you want to extract.
- ConditionThe condition that tells the engine where to look. You can use period markers such as is('Historical') or you can use conditions like Revenue > 0.
- Search DirectionOptionalIf your condition matches multiple periods, this tells the engine whether to grab the value from the 'start' (first match) or 'end' (last match) of that range. Defaults to 'start'.
Macro
It automatically grabs all the line items grouped directly under the current one. Wrap it inside functions like sum() or avg() to create dynamic roll-ups. For example, setting 'Total Operating Expenses' to sum(children()) will always add up its sub-accounts, even if you add or remove items later.
Syntax
Statistical
Calculates the average across multiple series for each time period.
Syntax
Arguments
- SeriesOptionalThe series you want to average.
Calculates the average value across your timeline. You can filter the series with period markers using functions like is('Historical').
Syntax
Arguments
- SeriesThe series you want to average.
- FilterOptionalAn optional boolean condition. The engine will only average the periods where this is true. E.g., if you use is('Historical') here, the engine will only average the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
Finds the highest value among the provided series for each time period.
Syntax
Arguments
- SeriesOptionalThe series you want to compare.
Finds the maximum value across your timeline. You can filter the series with period markers using functions like is('Historical').
Syntax
Arguments
- SeriesThe series you want to find the maximum value of.
- FilterOptionalAn optional boolean condition. The engine will only look at the periods where this is true. E.g., if you use is('Historical') here, the engine will only find the max of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
Finds the lowest value among provided series for each time period.
Syntax
Arguments
- SeriesOptionalThe series you want to compare.
Finds the minimum value across your timeline. You can filter the series with period markers using functions like is('Historical').
Syntax
Arguments
- SeriesThe series you want to find the minimum value of.
- FilterOptionalAn optional boolean condition. The engine will only look at the periods where this is true. E.g., if you use is('Historical') here, the engine will only find the min of the series where the period markers contain 'Historical'. If you leave this blank, the engine will evaluate the series across your entire timeline.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline. You can pin it using conditions like is_last('Historical'). If you leave this blank, the result will be placed in the very first period.
Calculates a rolling aggregation over a trailing window of periods. For example, use it to calculate a trailing twelve month (TTM) sum or a rolling 3-month average.
Syntax
Arguments
- SeriesThe series you want to evaluate.
- WindowThe number of trailing periods to include in the rolling window.
- MethodOptionalThe type of calculation: 'avg', 'sum', 'min', 'max', or 'prod'. If you leave this blank, it defaults to 'avg'.
Calculates the weighted average for each time period using alternating Value and Weight pairs.
Syntax
Arguments
- Value and Weight PairsOptionalAlternating arguments: Value 1, Weight 1, Value 2, Weight 2...
Calculates the weighted average of a series across your timeline.
Syntax
Arguments
- ValuesThe series of values you want to average.
- WeightsThe series containing the weights for each period.
- FilterOptionalAn optional boolean condition to filter which periods to include.
- PlacementOptionalTells the engine exactly where to drop the result on your timeline.
Timeshift
Grabs a value from a future period for each time period.
Syntax
Arguments
- SeriesThe series you want to look ahead at.
- PeriodsOptionalHow many periods into the future you want to look. For example, enter 1 for the next period. Defaults to 1 if left blank.
- Final ValueOptionalThe final value to use if there is no next period. If you leave this blank, it defaults to 0.
Grabs a value from a past period for each time period. This is useful for calculating period-over-period growth or carrying over an ending balance to the current period's starting balance.
Syntax
Arguments
- SeriesThe series you want to look back at.
- PeriodsOptionalHow many periods back you want to look. For example, enter 1 to get the previous period's value. Defaults to 1 if left blank.
- Initial ValueOptionalThe initial value to use if there is no previous period. You can pass in another variable as the initial value. If you leave this blank, the default is 0.