Custom Formula Indicator

crowe1288greg
Tera Contributor

I have an Automated Indicator that has a yearly frequency. I've collected scores back to 01/01/2023. 

 

My customer is requesting an AVG count for day, week, and month for each year. If I create formula indicators to determine these averages by dividing the score by either 365, 52, or 12, when I put them on a time series widget, the averages are misleading. Since 2025 is not a complete year, I can't use the formula that is being used for 2023 & 2024.

 

Here's my question, if I use Javascript within my formula indicator, since the source automated indicator only has 3 scores, is it possible to have the javascript act one way on the most recent score, and have javascript act another way on the other scores?

 

I'm trying not to create an automated indicator for each year.

 

Here's my thought, for the most current score, determine either number of days YTD, or number of weeks YTD, or number of months YTD, and divide the total by number. Then for the other scores, divide by either 365, 52, or 12.

 

Thanks for reading!

2 REPLIES 2

Mark Manders
Mega Patron

How can you have data for 2025 if it's a yearly collection? I assume your job runs on January 1st, collecting everything from last year? 

It doesn't really make sense that you have a yearly collection and you want the average for day/week/month for the running year. That sounds like you want to compare it to what it was in the previous years (since the average per day/week/month will be just 3 numbers on a yearly collection -> January will have the same number as June, since you are calculating the average).

 

If the comparison to the current running year is needed (for some reason), you should be creating a daily job so you can run the calculations every day/week/month.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

The customer would like the yearly, monthly, daily avg since 01/01/23. I'm trying to build everything to be accurate as of a PA data collection up till yesterday.

 

I've experimented with a single indicator with yearly frequency, but I have not determined how to sum the yearly counts. 

 

I've also experimented with an indicator for each year, but I still can't sum the indicators since the yearly frequencies are different.

 

I've tried using the 'method' within a formula indicator, but still can't sum the different years.