Returns a new FactList filtered that includes only those facts from the original that are within the specified DateRange. All DateRanges are built from the now parameter which provides a number of methods for expressing complex ranges relative to the date of the KPI calculation.

//filter out data not from the calendar month of the calculation date
var filtered = kpis.get('issue count').filter(now.monthToDate());

//filter out data not from the week (mon-sun) of the calculation date
var thisWeek = now.startOfWeek().until(now.endOfWeek());
var filtered = kpis.get('issue count').filter(thisWeek);

//filter out data not from first half of the day of the calculation date
var firstHalf = now.withTime(0,0,0,).until(now.withTime(12,0,0));
Var filtered = metrics.get('issue count').filter(firstHalf);
Did this answer your question?