Return the sum of all values for all metric or KPI Facts in the FactList, ignoring null or NaN values.  If no facts are in the list or all the facts have null or NaN values then return the default value passed to the function or NaN if a default value is not supplied.

// returns a FactList
var list = kpis.get('daily expenses');

// if list is empty zero is returned
var sum = list.sum(0);

return sum;
Did this answer your question?