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 value and returns a new Argument that only includes the data points for the highest value for each metric or KPI in the original Argument. For example, if the KPI calculation can discard all but the maximum value for each metric then the metrics variable can be filtered and re-assigned as follows:

metrics = metrics.maximum();

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

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