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])

accrint(issue, firstInterest, settlement, rate, par, frequency, basis)

  • Standard spreadsheet function

accrint(issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod)

  • Standard spreadsheet function

accrintm(issue, settlement, rate, par, basis)

  • Standard spreadsheet function

amordegrc(cost, datePurchased, firstPeriod, salvage, period, rate, basis, excelCompliant)

  • Standard spreadsheet function

amorlinc(cost, datePurchased, firstPeriod, salvage, period, rate, basis)

  • Standard spreadsheet function

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")

betadist(x, alpha, beta)

  • Standard spreadsheet function

betainv(probability, alpha, beta)

  • Standard spreadsheet function

ceiling(number)

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

choose(idx, values...)

  • Standard spreadsheet function

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])

cos(n)

  • Standard spreadsheet function

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)

coupdays(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

coupdaysbs(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

coupdaysnc(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

coupncd(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

coupnum(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

couppcd(settlement, maturity, frequency, basis)

  • Standard spreadsheet function

cumipmt(rate, nper, pv, startPeriod, endPeriod, typ)

  • Standard spreadsheet function

cumprinc(rate, nper, pv, startPeriod, endPeriod, typ)

  • Standard spreadsheet function

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])

db(cost, salvage, life, period)

  • Standard spreadsheet function

db(cost, salvage, life, period, month)

  • Standard spreadsheet function

ddb(cost, salvage, life, period)

  • Standard spreadsheet function

ddb(cost, salvage, life, period, factor)

  • Standard spreadsheet function

disc(settlement, maturity, pr, redemption, basis)

  • Standard spreadsheet function

dollarde(fractionalDollar, fraction)

  • Standard spreadsheet function

dollarfr(decimalDollar, fraction)

  • Standard spreadsheet function

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

  • Standard spreadsheet function

each_add(seq, val)

  • 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)

effect(nominalRate, npery)

  • Standard spreadsheet function

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])

false()

  • Standard spreadsheet function

fdist(x, degreesFreedom1, degreesFreedom2)

  • Standard spreadsheet function

filter(range, condition)

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

finv(probability, degreesFreedom1, degreesFreedom2)

  • Standard spreadsheet function

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()

formatbutton(label, updates...)

  • 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")

fv(rate, nper, pmt, pv, typ)

  • Standard spreadsheet function

fvschedule(principal, schedule)

  • Standard spreadsheet function

gammadist(x, alpha, beta, cumulative)

  • Standard spreadsheet function

gammainv(probability, alpha, beta)

  • Standard spreadsheet function

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)

intrate(settlement, maturity, investment, redemption, basis)

  • Standard spreadsheet function

ipmt(rate, per, nper, pv, fv, typ)

  • Standard spreadsheet function

irr(values)

  • Standard spreadsheet function

irr(values, guess)

  • Standard spreadsheet function

ispmt(rate, per, nper, pv)

  • Standard spreadsheet function

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])

mduration(settlement, maturity, coupon, yld, frequency, basis)

  • Standard spreadsheet function

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])

mirr(values, financeRate, reinvestRate)

  • Standard spreadsheet function

month(date)

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

nominal(effectRate, npery)

  • Standard spreadsheet function

normdist(x, mean, standardDev, cumulative)

  • Standard spreadsheet function

norminv(probability, mean, standardDev)

  • Standard spreadsheet function

normsdist(z)

  • Standard spreadsheet function

normsinv(probability)

  • Standard spreadsheet function

not(val)

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

now()

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

nper(rate, pmt, pv, fv, typ)

  • Standard spreadsheet function

npv(rate, values)

  • Standard spreadsheet function

oddfprice(settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis)

  • Standard spreadsheet function

oddfyield(settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis)

  • Standard spreadsheet function

oddlprice(settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis)

  • Standard spreadsheet function

oddlyield(settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis)

  • Standard spreadsheet function

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)

percentile(array, k)

  • Standard spreadsheet function

percentrank(array, x)

  • Standard spreadsheet function

pi()

  • Standard spreadsheet function

pmt(rate, nper, pv, fv, typ)

  • Standard spreadsheet function

power(number, power)

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

ppmt(rate, per, nper, pv, fv, typ)

  • Standard spreadsheet function

price(settlement, maturity, rate, yld, redemption, frequency, basis)

  • Standard spreadsheet function

pricedisc(settlement, maturity, discount, redemption, basis)

  • Standard spreadsheet function

pricemat(settlement, maturity, issue, rate, yld, basis)

  • Standard spreadsheet function

pv(rate, nper, pmt, fv, typ)

  • Standard spreadsheet function

quartile(array, quant)

  • Standard spreadsheet function

rand()

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

rate(nper, pmt, pv, fv, typ)

  • Standard spreadsheet function

rate(nper, pmt, pv, fv, typ, guess)

  • Standard spreadsheet function

received(settlement, maturity, investment, discount, basis)

  • Standard spreadsheet function

rgb(r, g, b)

  • Standard spreadsheet function

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)

seq_add(seq_a, seq_b)

  • 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])

sin(n)

  • Standard spreadsheet function

sln(cost, salvage, life)

  • Standard spreadsheet function

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])

switch(values...)

  • Standard spreadsheet function

syd(cost, salvage, life, per)

  • Standard spreadsheet function

tan(n)

  • Standard spreadsheet function

tbilleq(settlement, maturity, discount)

  • Standard spreadsheet function

tbillprice(settlement, maturity, discount)

  • Standard spreadsheet function

tbillyield(settlement, maturity, pr)

  • Standard spreadsheet function

tdist(x, degreesFreedom, tails)

  • Standard spreadsheet function

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)

tinv(probability, degreesFreedom)

  • Standard spreadsheet function

today()

  • Returns the current date
  • Example: today()

true()

  • Standard spreadsheet function

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)

vdb(cost, salvage, life, startPeriod, endPeriod)

  • Standard spreadsheet function

vdb(cost, salvage, life, startPeriod, endPeriod, factor)

  • Standard spreadsheet function

vdb(cost, salvage, life, startPeriod, endPeriod, factor, noSwitch)

  • Standard spreadsheet function

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)

xirr(values, dates)

  • Standard spreadsheet function

xirr(values, dates, guess)

  • Standard spreadsheet function

xnpv(rate, values, dates)

  • Standard spreadsheet function

year(date)

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

yearfrac(date, endDate)

  • Standard spreadsheet function

yearfrac(startDate, endDate, basis)

  • Standard spreadsheet function

yield(settlement, maturity, rate, pr, redemption, frequency, basis)

  • Standard spreadsheet function

yielddisc(settlement, maturity, pr, redemption, basis)

  • Standard spreadsheet function

yieldmat(settlement, maturity, issue, rate, pr, basis)

  • Standard spreadsheet function