Write a formula
Open the formula bar from the grid, enter a formula with suggestions or a template, and save it for all periods or for one period.
You write a formula in the formula bar. The bar opens in the toolbar above the model grid when you open a formula from the Formula column or from one period cell. Use this page to add, change, or remove a formula.
1. Open the formula bar
- Go to Scenario planning → open a model.
- Find the variable row.
- In the Formula column, select the ƒ button (Add formula).
If the row already has a formula, select the formula text in the Formula column. You can also move the focus to that button and press F2.
If you cannot see the Formula column, select Columns → Formula.
The bar shows an = sign and a text field with the placeholder Add a formula.
2. Type the formula
Type a variable name, a number, or a function. A list of suggestions opens below the field. It shows variables, functions, built-in helpers, keywords, and time references that match what you type.
| Key | Result |
|---|---|
| Up Arrow, Down Arrow | Move in the suggestion list |
| Tab | Insert the selected suggestion |
| Enter | Save a valid formula. If the formula is not valid yet, insert the selected suggestion |
| Escape | Close the suggestion list |
| Shift+Enter | Start a new line |
A function row in the list shows its parameters, such as round(number, [decimal_places]). Brackets mark an optional parameter.
Long formulas are easier to read on several lines. Add a note after //. Eigenn ignores the note when it calculates.
3. Fill the placeholders
A function or a template inserts placeholders in braces, such as {rate}. Eigenn selects the first placeholder.
- Type the value for the selected placeholder.
- Press Tab to go to the next placeholder.
- Press Shift+Tab to go back to the previous placeholder.
While a placeholder remains, the bar shows a hint, such as Fill in {rate} — Tab moves to the next. You cannot save until you fill all placeholders.
4. Insert a formula template
- In the formula bar, select Formula templates.
- Type in Search templates to filter the list.
- Select a template. Eigenn inserts it at the cursor.
- Fill each placeholder.
Some of the templates:
| Template | Inserts |
|---|---|
| Conditional flag | if {condition} then 1 else 0 |
| Running balance | {variable} previous month + {change} |
| Share of total | {part} / {total} |
| Floor at zero | max(0, {value}) |
| Uncertain input | {low} to {high} |
| Hiring ramp | ramp(timestep, {start}, {end}, 0, {target}) |
previous month is an older spelling of [previous]. Both give the same result.
5. Save or cancel
- Press Enter to save. The bar shows Saving while Eigenn saves the formula.
- If the formula has an error, the bar shows the message, and Enter does not save.
- Press Escape to close the bar without saving. If the suggestion list is open, the first Escape closes only the list.
The bar also shows Depends on and Feeds. Depends on lists the variables that the saved formula reads. Feeds lists the variables that use this variable, directly or through other formulas.
6. Write a formula for one period
Use a period formula when one forecast period needs different logic.
- On a row with a formula, select the cell of the period.
- Press F2.
- Write the formula. The bar shows the period, such as Applies to Dec ‘26 only.
- Press Enter.
The cell shows a small ƒ mark. Actual cells and quarter or year total cells cannot take a period formula.
To remove a period formula, select the cell, press F2, and select Use all-period formula. When you save a new all-period formula for the row, Eigenn also removes the period formulas of that row.
7. Change the formula of one dimension item
A variable that is broken down by a dimension has one row for each item. Each item uses the parent formula.
- Open the formula on the item row.
- Change the formula and press Enter.
To go back, open the formula on the item row and select Use parent formula.