Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Performance Analytics duration value sum to formula indicator to get availability Monthly/Quarterly

Brandon Akers
Tera Contributor

Hope I write this up well.

I am trying to make a report that allows you to see the availability of a Business Application using a formula indicator from the duration on the Outages table. The issues I am having are the Automated Indicator is using a script I found from this post and its throwing my numbers into the thousands when it should be less than 100.

 

This is a all the steps I am working with, please let me know where I am goin astray.

Indicator Source is from the Outage Table where Business Application is not empty>Type is Outage> Major Incident state is Accepted.

BrandonAkers_0-1724348982332.png

 

Automated Indicator Units is hours, and scripted using a custom script Incident Duration and Breakdown is by Business Application

BrandonAkers_7-1724350224819.png

 

Script is defined as "

current.duration.dateNumericValue() / (60 * 60 * 1000);"
BrandonAkers_2-1724349333604.png

 

and the Formula indicator Units in Hours and formula is "((730-[[BAPP.Availabilty.Duration2]]/730)*100)"

730 being set as the hours in a month

BrandonAkers_8-1724350282754.png

 


 

Initial job ran is for Historic

BrandonAkers_4-1724349596397.png

 

At the Analytics Hub I am getting the same score for each month of 24.45k hours and not showing a percentage for availability.

BrandonAkers_9-1724350327084.png

 

Showing Breakdown by BAPP *blocking out names of BAPPs

BrandonAkers_10-1724350427364.png

 

 

Where am I going in the wrong direction

So my data is capturing only for 1 month and repeating it?

The script/Formula Indicator is not the right calculations?

2 REPLIES 2

vincentroge
Tera Contributor

 

Sorry for a late reply, I'm sure you already found the answer by now or moved on, but I'm practicing using the forums and wanted to try answering your question

---------------------------------------------------------------

Main issue is that the Indicator Source doesn't tell you what timeframe to grab these outages. Making it grab all outages (I cannot see the Additional Conditions so I can't be 100% but since all the numbers are the same in both screenshots I assume that doesn't have the filter either). I would suggest adding a filter to the Indicator Source that is something like "Created on This Month". 

 

A couple other oddities have me confused:

  • the Formula has it's Unit set to Hours but you're multiplying by 100? that makes me think you're trying to give a percentage % of availability. If that's the case you are performing order of operations incorrectly and it's performing the division before the subtraction. You need to encapsulate the indicator like so:  ( 730 - [[outage_duration_indicator]] ) / 730 * 100
    • Though I would grab the actual hours of a given month using score_end. 
    • grab the month and year, like score_end.getMonth() and score_end.getYear() and determine the days in the month by that (year for leap years)  and multiply by 24 for your hours.
    • This could all be done in the script for the indicator instead of a formula btw. The formula indicator is used if you plan on using the scores from the main indicator in other ways.
  • The Indicator [[BAPP.Availability.Duration2]] is actually calculating the duration of outages. That feels like counter intuitive naming conventions. 

 

vincentroge
Tera Contributor

I replied to this but it isn't showing up??? 

Ah, I rewrote my reply here, but learned that posts need reviewed before they show up. 
Doesn't appear I can delete posts so I'll just edit it to explain this. heh