Formulas

Variables in Formulas

To reference a variable in a formula, type # to bring up the variable search menu. You can then start typing to filter and select the variable you need. This makes it easy to find exactly what you're looking for—without memorizing names or flipping between tabs. Once selected, the variable will be inserted into your formula with the correct formatting.

Variables in pluvo always start with a #,

Functions are case-sensitive and always end with open and close brackets that may or may not include parameters.

For example, month() is a function with no paramaters, but the "()" are still requires. Single-word functions are always lowercase, unless otherwise noted here. Multiple word functions are camel-case, meaning they start lowercase anf then each subsequent word begind with an uppercase character

e.g: sumIf(), countIf(), constantGrowth(), mondaysInMonth(), etc.

Basic Arithmetic

Operator
Syntax
Example

plus

+

1 + 1 = 2

minus

-

5 - 3 = 2

multiplication

*

2 * 3 = 6

division

/

10 / 2 = 5

Brackets

( )

( 1 + 2 ) * 2 = 6

Exponent

^

3^2 = 9

Square Root

sqrt()

sqrt(25) = 5

Growth Functions

Constant Growth

constantGrowth() increases a variable by a constant amount every set period (every month/quarter/year, etc.).

syntax: constantGrowth(starting_value, growth_per_period, 'frequency')

Accepted values for frequency include: monthly, quarterly, yearly, jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.

Note: Frequency MUST be inside 'single quotes'.

Example:

constantGrowth(100, 10, 'monthly')

This will start a forecast that is 100 in the first month, 110 in the second month, 120 in the third month, and so on.

Function
Description
Syntax
Example

constantGrowth

Grow by a constant amount every month/quarter/year

constantGrowth(starting value, amount to grow by, 'frequency')

constantGrowth(100,10,'monthly)

percentGrowth

Grow by a percentage every month/quarter/year

percentGrowth(starting value, amount to grow by, 'frequency')

percentGrowth(100,0.2,'yearly')

ifError()

Use ifError() to prevent broken outputs when a formula might return an error (like dividing by zero).

Syntax:

ifError(expression, fallbackValue)

Note: This, like all functions in Pluvo, is case-sensitive.

If the expression runs successfully, it returns the result. If it errors, it returns the fallbackValue.

Example:

ifError(Revenue / Headcount, 100000)

This returns Revenue per Employee, or 100000 if Headcount is zero.

You can also use a formula as the fallback:

ifError(Revenue / Headcount, Revenue * 0.2)

Simple, safe, and scalable.

Logical Functions

Function
Syntax
Description

If

if(condition, result_if_true, result_if_false)

Used to check a condition, return a specific value if the condition holds true, and return a different value if the condition holds false.

Add

add(num_1, num_2, ...)

Returns the sum of a set of numbers.

Sum

sum(num_1, num_2, ...)

Ree: Add.

Sum If

sumIf(folder, 'condition')

Sums variables in a folder IF the condition is true

Subtract

sub(num_1, num_2, ...)

Returns the difference of a set of numbers.

Multiply

mul(num_1, num_2, ...)

Multiplies two or more numbers.

Divide

div(num_1, num_2, ...)

Divides two or more numbers.

Average

avg(num_1, num_2, ...)

Returns the average from a range of numbers

Floor

floor(num)

Rounds down and returns the largest integer less than or equal to a given number.

Ceiling

ceil(num)

Rounds up and returns the smallest integer greater than or equal to a given number.

Count If

countIf( folder, 'condition')

Counts variables in a folder IF the condition is true

Count

count(num_1, num_2, ...)

Returns the number of elements in a range.

Min

min(num_1, num_2, ...)

Finds the smallest number in a range.

Max

max(num_1, num_2, ...)

Finds the largest number in a range.

Comparison Functions and Operators

Comparator
Syntax
Description

Equals

==

Returns TRUE if both conditions are equal

Greater Than

>

Returns TRUE if

Less Than

<

Returns TRUE if

Greater Than or Equal

>=

Returns TRUE if

Less Than or Equal

<=

Returns TRUE if

Other Mathematical functions and symbols

Function / Symbol
Syntax
Description

π

pi

≈ 3.14159

Euler's number

e

≈ 2.71828182

sine function

sin()

Returns the sine of a given angle

cosine function

cos()

Returns the cosine of a given angle

tangent function

tan()

Returns the tangent of a given angle

Check out our other formula guides.

Don't see what you're looking for? You can suggest a new feature here. We're adding support for new formulas and functions all the time!

Last updated

Was this helpful?