Returns the Fact with the maximum value in a metric or KPI FactList. If there are no Facts in the list or all of the Facts contain null or NaN values return a MissingFact which has no data and not breakdown. The MissingFact is a special case of a Fact object that can be useful to simplify defensive coding checks.

// get the largest expense in the last 30 days
var expenses = kpis.get('expenses').getMaximum();

// if there are no facts in the 'expenses' list this will 0
return expenses.value(0);
Did this answer your question?