Hello All! My first post to the Community so I hope I include the correct information to assist with my question!
I have been tasked with creating a dashboard for our calls for service and have no experience with Arcade. I would like to calculate our average response times from when our car gets the dispatch (FirstDispatchTime) until they arrive (FirstArrive), eliminating null entries in the calculation. A portion of the data export is below:
All of the 'Seconds2' columns are internally calculated using the 'CallTime' column so that does not really reflect our departments response time as we have no control over how long dispatch holds the call.
Ideally, I would like the displayed result shown as 'mm:ss' on the dashboard indicator.
Any script suggestion would be greatly appreciated!
Thank You!
Mark Klein
Solved! Go to Solution.
Arcade has a function, DateDiff. Give it two date fields and specify the units, and it will return the value.
DateDiff($feature['FirstArrive'], $feature['FirstDispatchTime'], 'minutes')
You can use that to calcualte a new field in the data itself, or you could use it in the Dashboard to show the response time.
If you can't include it as a field calculation, you will want to look into creating a Data Expression, but that's a bit more advanced if you've never used Arcade. Is calculating the field an option?
Arcade has a function, DateDiff. Give it two date fields and specify the units, and it will return the value.
DateDiff($feature['FirstArrive'], $feature['FirstDispatchTime'], 'minutes')
You can use that to calcualte a new field in the data itself, or you could use it in the Dashboard to show the response time.
If you can't include it as a field calculation, you will want to look into creating a Data Expression, but that's a bit more advanced if you've never used Arcade. Is calculating the field an option?
Thank you for the response! This has worked out great!
Mark