Formulas within Formulas
When creating a formula, it is sometimes necessary to create variables that are based on separate calculations, rather than issue fields or other attributes.
There are a few ways to do this in Structure formulas:
1. Define a Local Variable
For simple calculations, it is often easiest to define a local variable within your formula. See Local Variables.
2. Use an existing formula column
To map a variable to an existing formula column, see Columns as Variables.
3. Create a new formula
To map a variable to a new formula, in the variable’s Source dropdown, select Formula. A new Formula editor will appear for the variable. These “formulas within formulas” can also contain variables, which can be mapped to yet more formulas.
![Using a formula as a variable](../../__attachments/3677192972/Using%20a%20formula%20as%20a%20variable.png?inst-v=b5d2bcc6-760b-40dd-a92e-75b96a49f0ab)
Variables in a sub-formula are not the same as the variables declared by a parent formula; variables do not overwrite each other, even if they have the same name.