#### What are formulas?

Formulas are your way of creating functions on Fluxo to automate your rows as functions of themselves and other rows.

The major difference between formulas and models is that formulas apply to an entire row (actuals and forecasts), while models only apply to a certain period of forecasting.

#### Functions available

All these functions are available for both formulas and for the Custom Formula model type:

• row reference: references another row from the same or different table, from the same or different period. For example: if you want your formula to reference the Revenue row from the P&L table, the function would be row("Revenue","P&L",0). If you want the same thing, but actually you want to reference the previous month's revenue, formula would be: row("Revenue","P&L",1) .
• self: similar to row reference, with the difference that it's a reference to the value of the current row. So, for example, self(1) repeats the value from the previous month.
• abs: returns the absolute value of the parameter. So, for example abs(-5) = 5.
• avg: returns the arithmetic average of a set of values, that should be separated by commas. One way to use it is for example to return the average of the last 3 months of a value, which would be avg(self(1), self(2), self(3)).
• log: returns the logarithm of a certain value at a certain base. If no base is specified, it defaults to base 10. So, for example log(10) = log(10,10) = 1.
• max: returns the maximum of a set of values or functions, separated by comma.
• min: returns the minimum of a set of values or functions, separated by comma.
• ln: returns the natural logarithm of a certain value.
• pow: returns the exponentiation of a base to an exponent. For example pow(2,3) = 2 * 2 * 2 = 8 .
• round: returns the closest number to a value with a pre-determined number of digits. For example round(3.14, 1) = 3.1 .
• sqrt: returns the square root of the provided value.