The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to report on Total number of days in a month using an Automated Indicator

Eddie5
Tera Contributor

Hi Everyone,

 

I want to fetch total number of days in each month using an automated indicator.

Example : 

January - 31

Feb - 29

March - 31

Eddie5_0-1713991849199.png

 

12 REPLIES 12

AndersBGS
Tera Patron
Tera Patron

Hi @Eddie5 ,

 

What is the use case that you're trying to solve? To capture the number of days in a month is not really a use case.

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Eddie5
Tera Contributor

Hi @AndersBGS , we have an requirement of calculating total number of minutes in a month; that means in any given month total number of days is 30 then total minutes = 30*24hours*60mnt=43200 minutes.

Now considering a case of months having total 28/29 days in Feb, total 30 days /or 31 days in a other months then our total minutes will change as per month. And that is what we are trying to resolve here.

We want to calculate this through Formula indicators /or Automated Indicators.

Y A
Tera Contributor

Hello @Eddie5 ,

Any chance that you were able to solve the above query ?
I want to create a formula indicator to capture the availability % from outage hours using below formula :
1-((1440 *# of days in months)-outage hours)/(1440* # of days in months) * 100
Hence, need to get the number of days in a month dynamically.

Eddie5
Tera Contributor

@Y A  well, this was one of most difficult part of my work when working on performance analytics, but I was able to pull this one by research and here is the solution -

 

We cannot directly get number of days in a month but we can get Hours/Minutes.

I was able to create an automated indicator which calculates the number of hours in a month.

1. Create Indicator Source, below is SS for conditions, name indicator source as per your requirement

Eddie5_0-1739366623983.png

 

2. Create Automated Indicator, below is SS for conditions, name indicator as per your requirement

Eddie5_3-1739366954140.png

 

 

3. Create a Script

Eddie5_2-1739366742421.png

 

4. Create a Formula indicator to calculate no of days in a month as per your calculation

Use expression - {{Total Minutes Per Day / By month SUM}}

 

Now, the number of days in a month will be calculated on ground of total number of hours/minutes per month which is again total availability.

 

Tweak your formula to calculate Availability correctly.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.