Documentation
System Variables
System variables are used to obtain values outside the context of tables or flows.
  • Day (ms)
    • Number of milliseconds in a day. Useful for dividing or shifting dates. More date operations can be found below.
    • <Day (ms)> * 30 — 30 days
    • Date - <Day (ms)> — Shift the day value from the column back by one day.
    • (Date - Date2) / <Day (ms)> — Number of days between two dates. If the column type is Days, dividing is not necessary in this case.
  • Today (ms)
    • Current day, time reset to 00:00(12am), in unix-time representation in milliseconds.
  • Today (ISO format)
    • Current day, time reset to 00:00(12am), in ISO format 2024-01-08T00:00:00.000Z.
  • Now (ms)
    • Current time in unix-time representation in milliseconds.
  • Now (ISO format)
    • Current time in ISO format 2024-01-08T15:53:46.749Z.
Time reset occurs according to the local time zone or the column's time zone.
Mathematical Operations in Formulas
When using mathematical expressions in formulas, in addition to the standard operators +, -, *, /, you can use the following operators:
5 Mod 4 = 1 — remainder of division
pi * 2 — constant of number π (Pi) 3.14
e * 2 — constant e 2.71
4! — factorial of a number
2^3 or pow(2,3) — exponentiation
sin(cos(tan(90))) — sine, cosine, tangent
root 4 + 1 = 3 — square root of 4 plus 1
log 1000 = 3 — logarithm with base 10
round(5.49999, 1) = 5.5 — rounding a number to 1 decimal place
roundDown(5.99, 1) = 5.9 — rounding down a number to 1 decimal place
random(1, 10) — random number from 1 to 10
absInt(-1234) = 1234 — absolute value of a number
min(1, 2) = 1 — minimum number, expects two numbers
max(1, 2) = 2 — maximum number, expects two numbers
Date Operations in Formulas
Interval variables are presented in the expression editor hints.
fromToday(0) = Start of day
fromToday(-1) = Start of day - 1 day = Start of previous day — time offset from the start of the day by the specified number of days.
fromToday(-1, Month(interval)) = Start of day - 1 month — time offset from the start of the day by the specified number of months.
fromNow(-2, Month(interval)) = Current time - 2 months — offset of the current time by the specified interval, other parts of the date and time remain unchanged. For example, if the offset is in months, then the day, hour, etc. remain unchanged.
fromNow(-2, Month(interval), Week(interval)) = Current time - 2 months and transition the date to the start of the week — offset of the current time and transition to the start of the specified interval.
The following operations work in a similar way:
  • fromWeek
    • fromWeek(0) - Start of week
    • fromWeek(-2) = -2 weeks from the start of the current one
    • fromWeek(-2, Day(interval)) = -2 days from the start of the current week
  • fromMonth
    • fromMonth(0) - Start of month
  • fromYear
dateStart(<Today (ms)>, Month(interval)) — Transition of a specific date to the start of the specified interval
addInterval(<Today (ms)>, Year(interval), -2) = Date - 2 years — Date offset by the specified interval
dateDiffDuration(<date1>, <date2>, Month(interval)) = date1 - date2 = number of months — Number of intervals between two dates
Operations can be combined with each other, for example, specifying a date offset by the number of months between two other dates
addInterval(<date>, Month, dateDiffDuration(date, date2, Month))

📌 Also useful: Data Filtering | Columns