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 can apply to an entire row (Actuals and Forecasts), while models only apply to a certain period of forecasting.
Errors in Formulas
If there is an error in the entered formula, an !
icon will show to the left of the formula. If you hover over that icon, an error message will be shown to help fix the issue.
In the example below, the function self()
has an interval of 0, which is invalid. A row is not able to reference itself in the current month, only past months. If we correct the formula to self(1)
then the error icon will be removed.
Functions available
All these functions are available for both formulas
and for the Custom Formula
model type:
row reference:
row("row name", "sheet name", "space name", interval)
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 berow("Revenue","P&L","Space Name",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","Space Name",1)
.self:
self(interval)
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. The interval passed toself
must be greater than 0.abs:
abs(value)
Returns the absolute value of the parameter. So, for exampleabs(-5) = 5
.avg:
avg(value1, value2, ...)
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 beavg(self(1), self(2), self(3))
.log:
log(value, base)
Returns the logarithm of a certain value at a certain base. If no base is specified, it defaults to base 10. So, for examplelog(10) = log(10,10) = 1
.max:
max(value1, value2, ...)
Returns the maximum of a set of values or functions, separated by comma.min:
min(value1, value2, ...)
Returns the minimum of a set of values or functions, separated by comma.ln:
ln(value)
Returns the natural logarithm of a certain value.pow:
pow(base, exponent)
Returns the exponentiation of a base to an exponent. For examplepow(2,3) = 2 * 2 * 2 = 8
.round:
round(value, precision)
Returns the closest number to a value with a pre-determined number of digits. For exampleround(3.14, 1) = 3.1
.sqrt:
sqrt(value)
Returns the square root of the provided value.
โ