By default all metrics data collected for the day is provided to the KPI calculations and for KPI inputs the last 30 days of data is provided. This function filters all metrics or KPIs in this Argument by date and time and returns a new Argument that only includes the first chronologically data points. For example, if the KPI calculation can discard all but the first value for each metric then the metrics variable can be filtered and re-assigned as follows:

metrics = metrics.earliest();

var all = metrics.get('Unresolved Issues');    //first data for unresolved

var critical = metrics.get('Critical Issues'); //first data for critical
Did this answer your question?