Formulas
Supported Formulas on Presight
ByDouble-clicking
on the cell and typing =
on the table widget, a prompt will appear to guide you through the syntax for each supported formula.
Aggregation Formulas
SUM
Syntax: =
SUM
(ColumnName)
AVERAGE
Syntax: =
AVERAGE
(ColumnName)
COUNT
Syntax: =
COUNT
(ColumnName)
COUNTD
Syntax: =
COUNTD
(ColumnName)
Modeling Formulas
SUM
Syntax: =
SUM
(MetricName(t-m:t-n))
With m>n, t-m:t-n represents a time range for which the calculation will be made.
AVERAGE
Syntax: =
AVG
(MetricName(t-m:t-n))
GROWTH
Formula Growth will calculate period-over-period growth, the formula behind GROWTH is =(this period - last period)/last period
.
Syntax: =
GROWTH
((MetricName(t))
CUMULATIVE
Formula Cumulative will calculate all-time value of a metric.
Syntax: =
CUMULATIVE
((MetricName(t))
Basic Arithmetic Calculations
Basic calculation can be done with +
; -
; *
and /
(Addition; Subtraction; Multiplication and Division).
Syntax: =MetricName1(t) + MetricName2(t)
Arithmetic Calculations with multidimensions (dot.dim)
Arithmetic Calculations can be done with sub-metric using dot.dim syntax.
Syntax: =MetricName(t).DimensionName("DimensionValue")
Understanding Time Expression t
Current period (t) |
(t) refers to the current period of whatever time granularity you are at. E.g. (t) at Weekly Gran means current Week, (t) at Monthly Gran means current Month, (t) at Quarterly Gran means current Quarter, (t) at Yearly Gran means current Year |
n period(s) ago (t-n) |
(t-n) can be used to refer to the period before the current one. E.g. (t-1) at Monthly Gran means the previous month, (t-1) at Yearly Gran means the previous year. |
Of course, you can replace 1 with how many periods ago you want. |
The past n periods (t-m:t-n) (with m>n) |
For some common function to work (read: AVERAGE, SUM,...), it is necessary for time to be expressed in range. |
Presight lets you do that simply by writing (t-m:t-n) E.g. (t-3:t-1) refers to the past 3 periods |
You can update your formula anytime and all your changes will be automatically saved.
Impotant note: you will see some metrics with a different syntax of Metric.Dimension ("Dimension value")
. This is an advance syntax pre-released that is only turned on for our customer success team.
Please do not edit metrics created from this syntax.
If you require more metrics using this syntax, please contact our customer success team. This feature will be officially released in the coming week.
Forecast Formulas
Check out our supported forecasting formulas in the documentation below.
Forecasting a MetricFormulas in Cube Builder
More advanced formulas are available in Cube Builder function, check out our supported Cube Builder formulas in the documentation below.
Cube Builder formulasLast updated