       completed = 'data' in results.Completed ? results.Completed.data[0][0]  : 0,
       successful = 'data' in  results.Successful ? results.Successful.data[0][0] : 0,
       completedWErrors = 'data' in results['Completed with error(s)'] ? results['Completed with error(s)'].data[0][0] : 0;
+
     data.push({
       _id: {"channelID": channelId},
       failed: failed,

  switch requiredFormat
    when "retrieveAverageLoadTimePerHour" then _.forEach raw.data, (item) ->
      data.push
        load: item[0]
        timestamp: moment.unix item[1]

    when "retrieveChannelMetrics", "transactionsPerChannelPerHour" then _.forEach raw.data, (item) ->

    var render_url = "/render?target=transformNull(summarize(stats.counters." + domain + ".channels." + allowedIds[j]
    for (i = 0; i < status_array.length; i++) {
      path = render_url + ".statuses." + status_array[i] + ".count,'1week'))&from=-1days&format=json";
      results[status_array[i]] = co(function* () {
        yield exports.fetchData(path)
      });
      final[status_array[i]] = 'data' in results[status_array[i]] ? results[status_array[i]].data[0][0] : 0;
    }

    data.push({
