- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2015 09:08 AM
I have existing metrics that calculate duration and business duration of certain scripted conditions. I would like performance analytics to help calculate averages and provide charts to visualized these indicators.
For example, The metric is Release Task Lead time. Start is defined as when the Approval field is marked 'Approved'. End is defined as when the State changes to WIP. The metric is already established and collecting data. Business Duration is calculating based on a certain business schedule.
Since the metrics already have the data I would like to use Performance Analytics. Goal is to have the Average Business Duration of these Lead time metrics, monthly.
i have created Automated Indicators to collect the count of any metric instance where the Value is 'Lead Time'. I have the sum of each instance for the past 6 months.
Now I need to collect the total duration of these instances for each month, which I will then use a formula indicator to calculate the average.
The problem I am running into is trying to get a SUM of the Business Duration field values. I am unsure how to gather this data. I have setup my automated indicator but it's returning zero values.
Can anyone give me some direction on how to accomplish my goal?
Solved! Go to Solution.
- Labels:
-
Performance Analytics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 08:58 AM
Ok, well unless the business_duration field contains the number of miliseconds, this script is not going to work.
Out of the box the field business_duration is an duration field (datetime). To get the number of days back you first need to retrieve the fields content in miliseconds.
It will probably work if you create the script like this
var days=function(x) {
return x.dateNumericValue()/(24*60*60*1000);
};
days(current.business_duration);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 08:58 AM
Ok, well unless the business_duration field contains the number of miliseconds, this script is not going to work.
Out of the box the field business_duration is an duration field (datetime). To get the number of days back you first need to retrieve the fields content in miliseconds.
It will probably work if you create the script like this
var days=function(x) {
return x.dateNumericValue()/(24*60*60*1000);
};
days(current.business_duration);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 09:12 AM
Thanks for your help, that worked!