KPI Formual Reference

Detailed javascript reference material for writing custom KPI scripts

Roger Wallace avatar
102 articles in this collection
Written by Roger Wallace
CalculationDate

CalculateDate function: day()

CalculationDate.day() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: yesterday()

CalculationDate.yesterday() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: startOfWeek()

CalculationDate.startOfWeek() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: startOfMonth()

CalculationDate.startOfMonth() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: year()

CalculationDate.year() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: valueOf()

CalculationDate.valueOf('yyyy-MM-dd' | ‘yyyy-MM-dd hh:mm:ss’) returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: yearToDate()

CalculationDate.yearToDate() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: withTime(millisec)

CalculationDate.withTime(hours, minutes, seconds, milliseconds) returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: withTime()

CalculationDate.withTime(hours, minutes, seconds) returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: startOfYear()

CalculationDate.startOfYear() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: tomorrow()

CalculationDate.tomorrow() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: until()

CalculationDate.until(date) returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: weekToDate()

CalculationDate.weekToDate() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: plus()

CalculationDate.plus(number, 'days' | 'weeks' | 'Months' | 'years' | ‘hours’ | ‘minutes’ | ‘seconds’)
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: startOfDay()

CalculationDate.startOfDay() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: lastMonth()

CalculationDate.lastMonth() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: nextMonth()

CalculationDate.nextMonth() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: nextWeek()

CalculationDate.nextWeek() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: monthToDate()

CalculationDate.monthToDate() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: last7Days()

CalculationDate.last7days() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: month()

CalculationDate.month() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: minus()

CalculationDate.minus(number, 'days' | 'weeks' | 'Months' | 'years' | ‘hours’ | ‘minutes’ | ‘seconds’)
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: lastWeek()

CalculationDate.lastWeek() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: last30days()

CalculationDate.last30days() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: last14Days()

CalculationDate.last14days() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: last10Days()

CalculationDate.last10days() returns a DateRange
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: isEndOfYear()

CalculationDate.isEndOfYear() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: endOfYear()

CalculationDate.endOfYear() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: isEndOfWeek()

CalculationDate.isEndOfWeek() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: endOfWeek()

CalculationDate.endOfWeek() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: endOfPreviousWeek()

CalculationDate.endOfPreviousWeek() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: isEndOfMonth()

CalculationDate.isEndOfMonth() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function:

CalculationDate.endOfPreviousMonth() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: endOfDay()

CalculationDate.endOfDay() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: endOfMonth()

CalculationDate.endOfMonth() returns a CalculationDate
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: daysInMonth()

CalculationDate.daysInMonth() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

CalculationDate function: dayOfWeek()

CalculationDate.dayOfWeek() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago
Arguments

Arguments function: breakdown()

Argument.breakdown() returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: get(index)

Argument.get(index) returns a FactList
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: earliest()

Argument.earliest() returns an Argument
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: size()

Argument.size() return an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: breakdown(search)

Argument.breakdown(name, ...) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: get(search)

Argument.get(name) returns a FactList
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: get()

Argument.get() returns a FactList
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: getLatest(name)

Argument.getLatest(name) returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: value()

Argument.value() returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: latest()

Argument.latest() returns an Argument
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: names()

Argument.names() an Array of Strings
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: maximum()

Argument.maximum() returns an Argument
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: filter(search)

Argument.filter(name, ...) returns an Argument
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: count()

Argument.count() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: minimum()

Argument.minimum() returns an Argument
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: isEmpty()

Arguments.isEmpty() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

Arguments function: isNull()

Argument.isNull() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago
FactList

FactList function: predict()

FactList.predict(DateRange) returns a LinearFit
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: getLatest()

FactList.getLatest() returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: sum()

FactList.sum(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: valueFor()

FactList.valueFor(Date) returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: the95thPercentile

FactList.the95thPercentile(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: minimum()

FactList.minimum(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: isNull()

FactList.isNull() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: name()

FactList.name() returns a String
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: getMaximum()

FactList.getMaximum() returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: median()

FactList.median(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: getMinimum()

FactList.getMinimum() returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: maximum()

FactList.maximum(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: latest()

FactList.latest(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: countLessOrEqualTo()

FactList.countLessOrEqualTo(number) returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: filter(dates)

FactList.filter(DateRange) returns a FactList
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: filter(date)

FactList.filter(Date) returns a FactList
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: earliest()

FactList.earliest(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: countLessThan()

FactList.countLessThan(number) returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: average()

FactList.average(number) returns a decimal
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: isEmpty()

FactList.isEmpty() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: countNaN()

FactList.countNaN() returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: getEarliest()

FactList.getEarliest() returns a Fact
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: countGreaterThan()

FactList.countGreaterThan(number) returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: count()

FactList.count() return integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: countGreaterOrEqualTo()

FactList.countGreaterOrEqualTo(number) returns an integer
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: breakdown()

FactList.breakdown() returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

FactList function: breakdown(search)

FactList.breakdown(name, ...) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago
BreakdownSet

BreakdownSet function: asPercentage()

BreakdownSet.asPercentage() returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: valueOf()

BreakdownSet.valueOf(breakdown, label) returns a number
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: withPrefix()

BreakdownSet.withPrefix(prefix) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: subtract()

BreakdownSet.subtract(BreakdownSet) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: merge()

BreakdownSet.merge(BreakdownSet, ...) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: rename()

BreakdownSet.rename(original, new) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: scale()

BreakdownSet.scale(number) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: isEmpty()

BreakdownSet.isEmpty() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: multiply

BreakdownSet.multiply(BreakdownSet) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: isNull()

BreakdownSet.isNull() returns a boolean
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: divide()

BreakdownSet.divide(BreakdownSet) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: filter()

BreakdownSet.filter(name, ...) returns a BreakdownSet
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago

BreakdownSet function: get()

BreakdownSet.get(name) returns a Breakdown
Roger Wallace avatar
Written by Roger Wallace
Updated over a week ago