Bayu Aryadica Posted June 26, 2021 Posted June 26, 2021 Hi, My aim is to create an organizer topic with a metric that shows the forecast when a signal will cross a threshold. Is there a way to do this? Or is there another way where I can show in a Date format of when a certain signal is forecasted to cross a threshold that I can insert and automatically update in the organizer.
Thorsten Vogt Posted June 26, 2021 Posted June 26, 2021 Hello Bayu, you may try it this way. I set up a sample in which my forecasted value will exceed the threshold two times in the next 3 days: First step is identifying these periods by using the following formula: ($forecast > $limit).afterStart(0ns) This will create capsules with zero duration as I just need the timestamps for the points in time when the value will be exceed the limit. Next step is creating a new signal with the timestamp as the value: //Iterate over all capsules to create a signal //with the value of the timestamp at start of the capsule $limitExceeded.toSamples($c -> { //Get date of capsule start $date = $c.startKey() //Create sample for signal sample($c.startKey(), $date) }, 1s) Last step is creating the scorecard: In case you may want to display the timestamp in another format you may read this post and adjust the formula in step 2. Hope this helps. Regards, Thorsten 1
Bayu Aryadica Posted June 27, 2021 Author Posted June 27, 2021 Thanks Vogt, Exactly what I was looking for.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now