Overview
Formulas let you create computed columns that automatically calculate values based on other columns. If you’ve used Excel or Google Sheets, the syntax will feel familiar.Creating a Formula Column
- Click Add Column in your dataset
- Select Formula
- Enter your formula expression
- Name the new column
- Click Create
Syntax Basics
Referencing Columns
Wrap column names in double curly braces:Operators
| Operator | Description | Example |
|---|---|---|
+ | Add / Concatenate | {{price}} + {{tax}} |
- | Subtract | {{total}} - {{discount}} |
* | Multiply | {{quantity}} * {{price}} |
/ | Divide | {{total}} / {{count}} |
% | Modulo | {{id}} % 2 |
= | Equals | {{status}} = "active" |
!= | Not equals | {{status}} != "deleted" |
> < >= <= | Comparison | {{age}} >= 18 |
AND | Logical and | {{active}} AND {{verified}} |
OR | Logical or | {{role}} = "admin" OR {{role}} = "moderator" |
NOT | Logical not | NOT({{deleted}}) |
Functions Reference
Text Functions
UPPER(text)
UPPER(text)
Convert text to uppercase.
LOWER(text)
LOWER(text)
Convert text to lowercase.
TRIM(text)
TRIM(text)
Remove leading and trailing whitespace.
CONCAT(a, b, ...)
CONCAT(a, b, ...)
Join multiple values together.
LEFT(text, n)
LEFT(text, n)
Get the first n characters.
RIGHT(text, n)
RIGHT(text, n)
Get the last n characters.
MID(text, start, length)
MID(text, start, length)
Extract a substring.
LEN(text)
LEN(text)
Get the length of text.
REPLACE(text, old, new)
REPLACE(text, old, new)
Replace occurrences of a string.
FIND(search, text)
FIND(search, text)
Find the position of a substring within text. Returns the 1-based index of the first occurrence, or 0 if not found.
Math Functions
SUM(a, b, ...)
SUM(a, b, ...)
Add multiple values.
AVG(a, b, ...)
AVG(a, b, ...)
Calculate the average.
MIN(a, b, ...)
MIN(a, b, ...)
Find the minimum value.
MAX(a, b, ...)
MAX(a, b, ...)
Find the maximum value.
ROUND(number, decimals)
ROUND(number, decimals)
Round to specified decimal places.
FLOOR(number)
FLOOR(number)
Round down to nearest integer.
CEIL(number)
CEIL(number)
Round up to nearest integer.
ABS(number)
ABS(number)
Get absolute value.
Logic Functions
IF(condition, then, else)
IF(condition, then, else)
Conditional logic.
AND(a, b, ...)
AND(a, b, ...)
Returns true if all conditions are true.
OR(a, b, ...)
OR(a, b, ...)
Returns true if any condition is true.
NOT(value)
NOT(value)
Negate a boolean value.
ISBLANK(value)
ISBLANK(value)
Check if a value is null or empty.
COALESCE(a, b, ...)
COALESCE(a, b, ...)
Return the first non-null value.
Date Functions
NOW()
NOW()
Current date and time.
TODAY()
TODAY()
Current date (no time).
YEAR(date)
YEAR(date)
Extract the year from a date.
MONTH(date)
MONTH(date)
Extract the month (1-12).
DAY(date)
DAY(date)
Extract the day of month (1-31).
DATEDIFF(date1, date2, unit)
DATEDIFF(date1, date2, unit)
Calculate difference between dates.Units: “years”, “months”, “days”, “hours”, “minutes”
DATEADD(date, amount, unit)
DATEADD(date, amount, unit)
Add time to a date.
Examples
Calculate Age
Full Name with Title
Email Domain
Order Total with Tax
Status Label
Error Handling
Formulas handle errors gracefully:| Situation | Result |
|---|---|
| Null value in calculation | Usually null (unless using COALESCE) |
| Division by zero | null |
| Invalid function arguments | null with warning |
| Type mismatch | Attempted coercion, null if fails |