Return the number of Facts in a metric or KPI FactList, ignoring null or NaN values.  If no facts are in the list or all the facts have null or NaN values then return 0.

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

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

var sum = list.sum(0);
 
return sum / count;
Did this answer your question?