Canvas Docs
Search…
Supported formulas
See our full list of formulas and their syntax here.

day(date)

Extract the day of the month as a number from 1 to 31 from a given date

Arguments

  1. 1.
    date - the date to extract the day number of

month(date)

Extract the month as a number from 1 to 12 from a given date

Arguments

  1. 1.
    date - the date to extract the month number of

year(date)

Extract the year number from the given date

Arguments

  1. 1.
    date - the date to extract the year number of

date(year, month, day)

Creates a date from the provided year, month, and day values

Arguments

  1. 1.
    year - the year number of the date
  2. 2.
    month - the month number of the date from 1 to 12
  3. 3.
    day - the day number of the date from a to 31

today()

Calculates today's date

datediff(start_date, end_date, unit)

Creates a date from the provided year, month, and day values

Arguments

  1. 1.
    start_date - the date to begin counting from
  2. 2.
    end_date - the date to finish count at
  3. 3.
    unit - either 'year', 'month', or 'day'

if(condition, true_value, false_value)

If the first argument is true, return the second argument; otherwise, return the third argument

Arguments

  1. 1.
    condition - the condition to be evalauted to true or false
  2. 2.
    true_value - value to return if the condition is true
  3. 3.
    false_value - value to return if the condition is false

ifs(condition_1, condition_1_value, condition_2, condition_2_value)

Checks whether one or more conditions are met and returns the value that corresponds to the first TRUE condition. Accepts an arbitrary number of arguments.

Arguments

  1. 1.
    condition_1 - the first condition to be evalauted to true or false
  2. 2.
    condition_1_value - value to return if the first condition is true
  3. 3.
    condition_2 - the second condition to be evalauted to true or false
  4. 4.
    condition_2_value - value to return if the second condition is true

and(condition_1, condition_2)

Returns TRUE if all the input conditions in are true. Accepts an arbitrary number of arguments.

Arguments

  1. 1.
    condition_1 - the first condition to be evalauted to true or false
  2. 2.
    condition_2 - the second condition to be evalauted to true or false

or(condition_1, condition_2)

Returns TRUE if any of the input conditions in are true. Accepts an arbitrary number of arguments.

Arguments

  1. 1.
    condition_1 - the first condition to be evalauted to true or false
  2. 2.
    condition_2 - the second condition to be evalauted to true or false

not(condition)

Returns TRUE if the given conditional is FALSE.

Arguments

  1. 1.
    condition - the condition to be evalauted to true or false

round(number, scale)

Rounds the given number to the given scale.

Arguments

  1. 1.
    number - the number to be rounded
  2. 2.
    scale - the number of decimal points to round to

roundup(number)

Rounds the given number up to the nearest integer.

Arguments

  1. 1.
    number - the number to be rounded

rounddown(number)

Rounds the given number down to the nearest integer.

Arguments

  1. 1.
    number - the number to be rounded

concat(string_1, string_2)

Concatenates the text from the provided arguments into a single string. Accepts an arbitrary number of arguments.

Arguments

  1. 1.
    string_1 - first string to concatenate
  2. 2.
    string_2 - concatenated onto the end of string 1

datevalue(date)

Converts a date-like text field into a date

Arguments

  1. 1.
    date - a date-like text field

sum(column)

Returns the sum of a column.

Arguments

  1. 1.
    column - the column to sum over

average(column)

Returns the average of a column.

Arguments

  1. 1.
    column - the column to average over

countunique(column)

Counts the number of unique values in a column

Arguments

  1. 1.
    column - the column to count uniques