Guide › Formulas

Numbers and totals

Arithmetic and rounding; totals, averages and counts of several values; totals of subitems and mirror columns; running totals; shares of a group or a board.

Arithmetic and rounding

Function Gives Example
ROUND(n, decimals) Rounded to the nearest ROUND(2.345, 2) → 2.35
ROUNDUP(n, decimals) / ROUNDDOWN(n, decimals) Rounded up / down ROUNDUP(2.301, 1) → 2.4
MROUND(n, multiple) To the nearest multiple MROUND(17, 5) → 15
CEILING(n, multiple) / FLOOR(n, multiple) Up / down to a multiple CEILING({item's Hours}, 0.25) → quarter hours
INT(n) The whole part (down) INT(7.9) → 7
ABS(n) Without sign ABS(-4) → 4
MOD(n, divisor) The remainder MOD(17, 5) → 2
POWER(n, exponent), SQRT(n), LOG(n, [base]), PI() Powers, roots, logarithms SQRT(16) → 4
RAND(), RANDBETWEEN(low, high) A random number RANDBETWEEN(1000, 9999)

A number with a decimal comma, such as "3,5" in a Text column, is text: VALUE(SUBSTITUTE({item's Amount}, ",", ".")) turns it into 3.5.

Totals of several values

These work on numbers, columns and lists, mixed:

Function Gives
SUM(…) The total
AVERAGE(…), MEDIAN(…) The mean, the middle value
MIN(…), MAX(…) The smallest, the largest
COUNT(…) How many numbers
COUNTA(…) How many values that aren’t empty
PRODUCT(…) All multiplied
SUMPRODUCT(list1, list2) Items multiplied in pairs, then added: quantities × prices
=SUM({item's Cost 1}, {item's Cost 2}, {item's Cost 3})
=MAX({item's Q1}, {item's Q2}, {item's Q3}, {item's Q4})

Several values in one column

A Mirror column, a Dropdown or the Subitems column holds several values. These functions read them, whatever separates them:

Function Gives
MONDAY.NUMBER.SUM(column), .AVG, .MIN, .MAX Total, average, smallest, largest of the numbers
MONDAY.GENERAL.COUNT(column) How many values
MONDAY.DATE.MIN(column), MONDAY.DATE.MAX(column) The earliest, the latest date
MONDAY.DATE.TIMELINE(column) From the earliest to the latest date, ready for a Timeline column
MONDAY.DURATION.SUM(column), .AVG, .MIN, .MAX Of Time tracking values, as HH:MM:SS
MONDAY.TIMELINE.SUM(column) Days covered by several timelines

SUBITEMS.SUM, MIRROR.SUM and the like are other names for the same functions. They need a Pro plan or higher.

=MONDAY.NUMBER.SUM({item's Subitems cost})          → the cost of all subitems, from a Mirror of their Cost

In the new recipes the same values can also be handled as a list: SUM(VALUE(LIST.SPLIT({item's Subitems cost}))).

Running totals new recipes

SCAN(start, list, LAMBDA(total, x, calculation)) gives every step of a total: the running balance of a list of movements.

=SCAN(0, VALUE(LIST.SPLIT({item's Movements})), LAMBDA(balance, x, balance + x))

With 10, -3, 5 it gives 10, 7, 12. REDUCE(start, list, LAMBDA(total, x, calculation)) gives only the final result.

Compared with the group or the board new recipes

MONDAY.GROUP.COLUMN("Cost") and MONDAY.BOARD.COLUMN("Cost") give the Cost of every item of the group or of the board, so an item can be compared with the others:

=ROUND({item's Cost} / SUM(MONDAY.GROUP.COLUMN("Cost")), 4)       → the item's share of the group's cost
=XMATCH({item's Score}, SORT(MONDAY.BOARD.COLUMN("Score"), 1, -1))  → the item's rank on the board (1 = highest)
=SUM(MONDAY.BOARD.COLUMN("Cost")) - {item's Cost}                  → the cost of all the other items

When one item’s Cost changes, every item’s share changes too. To keep them all up to date, use the recalculate block: see monday items, people and boards.

Still stuck? Open a ticket or try the formula debugger.