Skip to main content

I was able to follow the instructions on another thread on how to create an aggregation tag for an integration over 24 hours of a binary tag for line running or not and it will give me the downtime over the last 24 hours at any specific point. Is there a way to lock in a time so that on any given day at 7 am, it will show me the downtime over the last 24 hours to the previous day at 7 am? We have a few metrics like that that we report out on over the 7 am - 7 am window and that feature would be very helpful.

Hi Benjamin - you can create a formula tag to achieve what you are asking for.

The formula would be something like this:

if(hour = 7, agg_tag, sqrt(-1))

“hour” would be mapped to the TM_hour_* tag that corresponds to your timezone (for example: TM_hour_US_Central) and the “agg_tag” would be mapped to your 24hr aggregation tag you already created.

The sqrt(-1) in the third parameter position of the if statement enables interpolation between your data points. The resulting formula tag is an interpolated tag that plots a value daily at 7a. However, if you would like the tag to be displayed in a discrete, stepped format, you can follow the instructions in this post here: 

Please let me know if you have any further questions!

Kevin


Hi Benjamin - you can create a formula tag to achieve what you are asking for.

The formula would be something like this:

if(hour = 7, agg_tag, sqrt(-1))

“hour” would be mapped to the TM_hour_* tag that corresponds to your timezone (for example: TM_hour_US_Central) and the “agg_tag” would be mapped to your 24hr aggregation tag you already created.

The sqrt(-1) in the third parameter position of the if statement enables interpolation between your data points. The resulting formula tag is an interpolated tag that plots a value daily at 7a. However, if you would like the tag to be displayed in a discrete, stepped format, you can follow the instructions in this post here: 

Please let me know if you have any further questions!

Kevin

Hi Kevin, following these steps yields me the result of “This formula can't be saved because it exceeds the maximum number of allowed levels (2) in a formula” when I attempt to save. My aggregate tag is set up as follows where the Pool_Lvl_Running_1 is an if statement if the pool level is above 30% to return a 0 if true and a 1 if false to indicate downtime:

 


Hi ​@benjamindavis 

There is a limit on the number of nested calculated tags (i.e., formula/aggregation/… tags used in another formula/aggregation/...), which is currently set to 2 levels. As you’re trying to create a formula on an aggregated tag that is based on another formula, you’re adding a third level.

The good news is that our development team is working on allowing more levels for tag builder tags, which should become possible in one of our next versions. In the meantime, the custom calculations functionality (part of the expert license) provides more flexibility in configuring calculated tags and would make this use case possible as well.

Kind regards,
Jef