Fix dashboard totals division by zero on first install

Multiple errors returned when there is no values for the statistic totals in the dashboard. Occurs on initial install. This fix bypasses the formulas if values are zero.