KPIs always track values on a daily basis, their formula are executed and the result is stored for a specific date. As new metrics flow into ServiceClarity and are converted into KPIs this date is normally the current date, today. However, it is often possible to backdate KPI calculation or to recalculate values after updating a KPI formula.
KPI formula are always executed in the context of a calculation date, which is supplied to the formula are the special variable now. This variable is a CalculationDate object and it provides various functions and constants for expressing dates and date ranges relative to the date of the calculation.
var yesterday = now.yesterday(); //a date
var thisDayLastWeek = now.lastWeek(); //a date
var firstOfThisMonth = now.startOfMonth(); //a date
Var thisMonth = now.monthToDate(); //a range of dates
The CalculationDate functions and constants can be used to find and filter specific values from metric and KPI FactLists.