Function reference
The complete Phase-1 surface: 27 functions, deliberately small. Each links to its own page with signature, behavior, examples, and gotchas.
Aggregations
Section titled “Aggregations”| Function | |
|---|---|
Sum(column) |
sum |
Count(column) |
count of non-blank values |
CountDistinct(column) |
distinct count |
Avg(column) |
average |
Min(column) / Max(column) |
extremes |
Median(column) |
median (dialect-gated) |
Stdev(column) / Var(column) |
spread |
Context
Section titled “Context”| Function | |
|---|---|
Calculate(expr, mod…) |
evaluate under a modified filter context |
RemoveFilters(dims…) |
lift filters & grouping — the totals tool |
KeepFilters(pred) |
explicit additive predicate (alias) |
Fixed(dims…, expr) |
fixed-grain (LOD) evaluation |
Time intelligence
Section titled “Time intelligence”| Function | |
|---|---|
DateShift(col, n, unit) |
same period last year/quarter/… |
YTD(expr, col) |
to-date accumulation |
RollingSum(expr, n, grain) |
trailing window |
Logic & variables
Section titled “Logic & variables”| Function | |
|---|---|
Iif(cond, then, else) |
two-branch conditional |
Case(cond, r, … [, default]) |
searched conditions |
Switch(expr, v, r, … [, default]) |
value match |
Let(name, expr, body) |
named sub-expression |
Scalars
Section titled “Scalars”| Function | |
|---|---|
Divide(a, b [, fallback]) |
safe division |
Round(v, digits) / Abs(v) |
numeric utilities |
Upper(s) / Lower(s) |
string case |
Coalesce(a, b, …) |
first non-blank |
ToText(v) |
number/date → string for & |
Coming in Phase 2 (signatures frozen)
Section titled “Coming in Phase 2 (signatures frozen)”Iterator aggregates SumX / AvgX / MinX / MaxX · view-relative LOD
Include / Exclude · alternate relationships UseRelationship ·
semi-additive LastNonEmpty / PeriodEndSnapshot · Fixed(…, IgnoreFilters)
· QTD/MTD grain variants · Percentile(column, p) · CountRows(table).