Below is the list of CubeWeaver built-in functions. Check docs if you need custom functions.

#### abs(n)

• Returns the absolute value of n
• Example: `abs([B:3])`

#### and(values...)

• Boolean and
• Example: `and(A.FLAG, [B:3]=5)`

#### array(values...)

• Constructs a sequence from given values
• Example: `sum(array(1,2,3))`

#### average(range)

• Computes the average of cells in a range (sum()/count())
• Example: `average([A:(1,2,3)])`

#### averageif(range, condition)

• Conditionally computes the average of cells in a range (sumif()/countif())
• Example: `averageif([A:all()], \$cell.A.TEXT="test")`

#### ceiling(number)

• Returns a rounded up number
• Example: `ceiling([A:4])`

#### concatenate(strings...)

• Combines several text strings into one string
• Example: `concatenate("Comment is: ", A.COMMENT)`

#### contains(array, row)

• Returns true if an array contains the row
• Example: `contains([A:(3,4,5), A])`

#### count(range)

• Counts the number of cells in a range
• Example: `count([A.all()])`

#### countif(range, condition)

• Conditionally counts the number of cells in a range
• Example: `count([A.all()], \$cell > 3)`

#### date(y, m, d)

• Returns the date, given the year, month and day of the month
• Example: `date(1990, 2, 20)`

#### day(date)

• Returns the day of the month for a date
• Example: `day([A:3])`

#### daysinmonth(date)

• Returns the number of days in a month
• Example: `daysinmonth([A:3])`

#### duration(settlement, maturity, coupon, yld, frequency, basis)

• Add a fixed value to a sequence. Result is a sequence.
• Example: `each_add(H2.[B:4],3)`

#### each_eq(seq, val)

• 'Equals' operation on a sequence. Result is a sequence.
• Example: `each_eq(H2.[B:4],3)`

#### each_ge(seq, val)

• 'Greater or equal' operation on a sequence. Result is a sequence.
• Example: `each_ge(H2.[B:4],3)`

#### each_gt(seq, val)

• 'Greater than' operation on a sequence. Result is a sequence.
• Example: `each_gt(H2.[B:4],3)`

#### each_if(bool_seq, val1, val2)

• Takes the first or the second value depending on the value of a boolean sequence. Result is a sequence.
• Example: `each_if(each_ge(H2.[A:3],3),[B:4],0)`

#### each_le(seq, val)

• 'Less or equal' operation on a sequence. Result is a sequence.
• Example: `each_le(H2.[B:4],3)`

#### each_lt(seq, val)

• 'Less than' operation on a sequence. Result is a sequence.
• Example: `each_lt(H2.[B:4],3)`

#### each_mul(seq, val)

• Multiply each value of a sequence with a fixed value. Result is a sequence.
• Example: `each_mul(H2.[B:4],3)`

#### edate(date, months)

• Adds a number of months to a date
• Example: `edate([A:3], 3)`

#### element(d)

• Converts a row reference stored in a cell to a row
• Example: `element([A:3]).COLUMN1`

#### exp(n)

• Returns e raised to the power n
• Example: `exp([B:3])`

#### filter(range, condition)

• Returns only those cells of a range which meet a condition
• Example: `filter([A.all()], \$cell>3)`

#### floor(number)

• Returns a rounded down number
• Example: `floor([A:4])`

#### forecast(forecastPoint, yvalues, xvalues)

• Fits a straight line to data using linear regression and returns a point on that line
• Example: `forecast(3, H2.[B:4], H2.[B:5])`

#### format(type, format_string)

• Dynamically format a cell. Supported types: number,date,time,boolean,text
• Example: `format("number", "0.00")`

#### formatbool()

• Renders a checkbox inside a cell
• Example: `formatbool()`

• Renders a button inside a cell. Clicking the button will assign values to cells relative to the button location.
• Example: `formatbutton("Submit", update([ACC:19],1))`

#### formatdate(format_string)

• Formats a date cell according to a specified format string
• Example: `formatdate("MM/dd/yyyy")`

#### formatnum(format_string)

• Formats a numeric cell according to a specified format string
• Example: `formatnum("0.00")`

#### formatrange(min, max, step)

• Renders a range slider inside a cell
• Example: `formatrange(0, 100, 5)`

#### formattext()

• Renders a textbox inside a cell
• Example: `formattext()`

#### formattext(text)

• Shows readonly text inside a cell
• Example: `formattext(A.COMMENT)`

#### formattime(format_string)

• Formats a time cell according to a specified format string
• Example: `formatdate("hh:mm")`

#### if(condition, val1, val2)

• Returns one of two values, depending on a boolean condition
• Example: `if(A=A:3, [B:3], 4)`

#### iferror(value, value_if_error)

• Return a certain value if a formula evaluates to an error
• Example: `iferror([A:3]/[B:3], -1)`

#### ln(n)

• Returns the natural logarithm of n
• Example: `ln([B:3])`

#### log(n)

• Returns the logarithm of n to the base 10
• Example: `log([B:3])`

#### log(n, b)

• Returns the logarithm of n to the base b
• Example: `log([B:3], 3)`

#### lower(s)

• Converts a text string to lowercase
• Example: `lower(A.TEXT_COLUMN)`

#### match(searchitem, seq)

• Returns the position of a search item in a sequence
• Example: `match(3, H2.[B:4])`

#### match(searchitem, seq, matchtype)

• Returns the position of a search item in a sequence
• Example: `match(3, H2.[B:4], -1)`

#### max(range)

• Returns the maximum of a cell range
• Example: `max([A.join(B)])`

#### max(val, val2)

• Returns the maximum of two values
• Example: `max([A:3],[A:4])`

#### min(range)

• Returns the minimum of a cell range
• Example: `min([A.join(B)])`

#### min(val, val2)

• Returns the minimum of two values
• Example: `max([A:3],[A:4])`

#### month(date)

• Returns the month for a date
• Example: `month([A:3])`

#### not(val)

• Negates a boolean value
• Example: `not(A.FLAG)`

#### now()

• Returns the current time and date
• Example: `now()`

#### offset(seq, offset)

• Skips the first 'offset' elements of a sequence. Result is a sequence.
• Example: `offset(H2.[B:4], 3)`

#### offset(seq, offset, size)

• Skips the first 'offset' elements of a sequence and takes 'size' elements which follow. Result is a sequence.
• Example: `offset(H2.[B:4], 3, 2)`

#### or(values...)

• Boolean or
• Example: `or(A.FLAG, [B:3]=5)`

#### ordinal(d)

• Returns the row's position (1,2,3...) in a table
• Example: `ordinal(A)`

#### power(number, power)

• Returns a number raised to a power
• Example: `power([A:3], 2)`

#### rand()

• Returns a random number between 0 and 1
• Example: `rand() * 10`

#### round(number)

• Returns a rounded number
• Example: `round([A:4])`

#### round(number, places)

• Returns a number rounded to a certain precision
• Example: `round([A:4], 2)`

#### select(range, selector)

• Select a value for each cell in a range. Result is a sequence.
• Example: `select(H1.[A.join(B)], \$cell.B.NUMBER_COLUMN)`

• Element-wise addition of two sequences
• Example: `seq_add(H2.[A:3], H2.[A:4])`

#### seq_and(seq_a, seq_b)

• Element-wise and of two sequences
• Example: `seq_and(H2.[A:3], H2.[A:4])`

#### seq_if(bool_seq, seq, c)

• Takes the first or the second value depending on the value of a boolean sequence. Result is a sequence.
• Example: `seq_if(each_ge(H3.[A:3],3),H2.[B:4],0)`

#### seq_if2(bool_seq, seq1, seq2)

• Takes the first or the second value depending on the value of a boolean sequence. Result is a sequence.
• Example: `seq_if2(each_ge(H3.[A:3],3),H2.[B:4],H2.[B:5])`

#### seq_mul(seq_a, seq_b)

• Element-wise multiplication of two sequences
• Example: `seq_mul(H2.[A:3], H2.[A:4])`

#### seq_not(seq)

• Element-wise not of a sequence
• Example: `seq_not(each_ge(H2.[A:3],3))`

#### seq_or(seq_a, seq_b)

• Element-wise or of two sequences
• Example: `seq_or(H2.[A:3], H2.[A:4])`

#### sqrt(n)

• Returns the square root of n
• Example: `sqrt([B:3])`

#### sum(range)

• Sums the contents of cells in a range
• Example: `sum([A:(1,2,3)])`

#### sumif(range, condition)

• Conditionally sums the contents of cells in a range
• Example: `sum([A:(1,2,3)], \$cell > 3)`

#### sumproduct(range1, range2)

• Returns the sum of the products of two cell ranges
• Example: `sumproduct([A.all(), B:3], [A.all(), B:4])`

#### text(m)

• Returns a caption of a row (should only be used for formatting rules)
• Example: `text(A)`

#### text(d)

• Convert a number to text
• Example: `text(3)`

#### today()

• Returns the current date
• Example: `today()`

#### update(destination, source)

• Only usable inside formatbutton(). Assigns values to a cell range (relatively to a button)
• Example: `update([A:3], [A:5] + 4)`

#### upper(s)

• Converts a text string to uppercase
• Example: `upper(A.TEXT_COLUMN)`

#### validate(value, condition, message)

• Marks a cell as invalid if a certain condition is false. Returns the first argument.
• Example: `validate([B:1]+3, \$value <= 3, "result greater than 3")`

#### value(d)

• Converts a row's identifier to a numeric representation.
• Example: `value(A)`

#### value(s)

• Returns a number, given a text representation
• Example: `value(A.TEXT_COLUMN)`

#### weekday(date)

• Returns the weekday for a date
• Example: `weekday([A:3])`

#### weekday(date, type)

• Returns the weekday for a date
• Example: `weekday([A:3], 2)`

#### with(\$variable=value1, value2)

• Assigns value1 to a variable. Than computes value2 using the assigned variable.
• Example: `with(\$x=[B:1], \$x*\$x)`

#### year(date)

• Returns the year for a date
• Example: `year([A:3])`