time series report on peak incident periods

mrswann
Kilo Guru

I need to create a report based on Peak Periods (actually just showing us trend of Hour for created field value on Incident table)

The problem: reports do not show zero values, so we skew the graph slightly by not plotting these data points

eg. No calls occurred at 4am, so there axis shows 1,2,3,5,6, etc

One possible solution could be to utilise the PA widgets as these are really nice and DO show zero values eg: "Number of new Incidents"

However, I cannot see how to create a new time series and/or Frequency of "Hourly" and collect data based on this unit

Something multilevel pivot seems to have addressed from H, so clearly a gap but when we need a visual representation - we need the scale to be consistent so it should show 24 hours on the axis regardless!

Please don't make me export to Excel!!!

8 REPLIES 8

Adam Stout
ServiceNow Employee
ServiceNow Employee

Check the timezone setting on the data collection job.

The Data Collector Time Zone is System (US/Eastern).  No other data collected using the same collection job has offset data.  This problem only exists with the HourOfDay breakdown.

Try this as script:

 

var getHourOfDay = function (x) {
	var hoursConverter = new Date(x.dateNumericValue()); 
	var theHour = hoursConverter.getHours();
	return theHour;
};
getHourOfDay(current.opened_at);

 

Cheers, Pieter

Perfect!  Thank you.