Formulas
Use these spreadsheet-like formulas to analyze your data
Extract the day of the month as a number from 1 to 31 from a given date
- 1.
date
- the date to extract the day number of
Extract the month as a number from 1 to 12 from a given date
- 1.
date
- the date to extract the month number of
Extract the year number from the given date
- 1.
date
- the date to extract the year number of
Creates a date from the provided year, month, and day values
- 1.
year
- the year number of the date - 2.
month
- the month number of the date from 1 to 12 - 3.
day
- the day number of the date from a to 31
Calculates today's date
True if the first argument contains the second argument. Both arguments must be text.
- 1.
expression_1
- the string to search in - 2.
expression_2
- the string to search for
Division, but returns 0 if the denominator is 0 instead of erroring.
- 1.
numerator
- the number to divide - 2.
denominator
- the number to divide by
Returns null if the value matches the condition, or the value otherwise.
- 1.
condition
- the condition to check - 2.
value
- the value to return
Returns null if the value is 0 and the value otherwise. Useful for safe divison.
- 1.
value
- the value to test and return
Parses the first argument as a JSON string and returns the value of the element pointed to by the path in the second argument. Accepts an arbitrary number of arguments
- 1.
column_id
- the name of the JSON column with the data that you want to extract. - 2.
path
- (accepts one or more) the key(s) or indexes to look-up in the JSON document
Calculates the number of years, months, days or hours between two dates.
- 1.
start_date
- the date to begin counting from - 2.
end_date
- the date to finish count at - 3.
unit
- either 'year', 'month', 'day', 'hour', or 'minute'
Adds a number of date units to a date.
- 1.
unit
- either 'year', 'month', 'day', 'hour', or 'minute' - 2.
amount
- the amount of date units to add - 3.
start_date
- the date to modify
Replaces all occurrences of from_value with to_value in original_value
- 1.
original_value
- the string to perform the replace on - 2.
from_value
- the value to be replaced - 3.
to_value
- the value to replace with
A custom SQL statement
- 1.
expression
- the SQL expression
If the first argument is true, return the second argument; otherwise, return the third argument
- 1.
condition
- the condition to be evalauted to true or false - 2.
true_value
- value to return if the condition is true - 3.
false_value
- value to return if the condition is false
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.
- 1.
condition_1
- the first condition to be evalauted to true or false - 2.
condition_1_value
- value to return if the first condition is true - 3.
condition_2
- the second condition to be evalauted to true or false - 4.
condition_2_value
- value to return if the second condition is true
Returns TRUE if all the input conditions in are true. Accepts an arbitrary number of arguments.
- 1.
condition_1
- the first condition to be evalauted to true or false - 2.
condition_2
- the second condition to be evalauted to true or false
Returns TRUE if any of the input conditions in are true. Accepts an arbitrary number of arguments.
- 1.
condition_1
- the first condition to be evalauted to true or false - 2.
condition_2
- the second condition to be evalauted to true or false
Returns TRUE if the given conditional is FALSE.
- 1.
condition
- the condition to be evalauted to true or false
Rounds the given number to the given scale.
- 1.
number
- the number to be rounded - 2.
scale
- the number of decimal points to round to
Rounds the given number up to the nearest integer.
- 1.
number
- the number to be rounded
Rounds the given number down to the nearest integer.
- 1.
number
- the number to be rounded
Concatenates the text from the provided arguments into a single string. Accepts an arbitrary number of arguments.
- 1.
string_1
- first string to concatenate - 2.
string_2
- concatenated onto the end of string 1
Converts a date-like text field into a date
- 1.
date
- a date-like text field
Returns the sum of a column.
- 1.
column
- the column to sum over
Returns the average of a column.
- 1.
column
- the column to average over
Counts the number of unique values in a column
- 1.
column
- the column to count uniques
Returns a value from a following row, offset by a number of rows (by default 1)
- 1.
column
- the column to be returned - 2.
offset
- the number of rows to offset by (defaults to 1) - 3.
order_by
- the order by which the following row is determined - 4.
partition_by
- pick following row only from rows matching this partition
Returns a value from the a previous row, offset by a number of rows (by default 1)
- 1.
column
- the column to be returned - 2.
offset
- the number of rows to offset by (defaults to 1) - 3.
order_by
- the order by which the previous row is determined - 4.
partition_by
- pick previous row only from rows matching this partition
Returns a value from the a previous row, offset by a number of rows (by default 1)
- 1.
column
- the column to be returned - 2.
offset
- the number of rows to offset by (defaults to 1) - 3.
order_by
- the order by which the previous row is determined - 4.
partition_by
- pick previous row only from rows matching this partition
Returns a value from the a following row, offset by a number of rows (by default 1)
- 1.
column
- the column to be returned - 2.
offset
- the number of rows to offset by (defaults to 1) - 3.
order_by
- the order by which the following row is determined - 4.
partition_by
- pick following row only from rows matching this partition
Returns a sum of values from a column in a pivot
- 1.
column
- the column to be summed over
Last modified 5mo ago