Jump to content

Identify a value within a capsule and show it at the end of the capsule


Recommended Posts

Hello,

i want to identify a value (orange line) at a the batch time (increasing green line), when this equals 47h and i want to present it at the end of batch, which varies between 48-60h).

i tried different formulas:

-defining a capsule from 46.8-47.2, and identify mac value

-$signal.aggregate(maxvalue(), $time == 47, endkey())

and some more, but i always get 2 values, one at the right moment and one at the end of the batch, but not what i'm looking for.

 

any suggestion?

thank you

 

image.png

Link to comment
Share on other sites

Hi Margarida,

you get two values because of the condition. The first value is calculated when the time signal is increasing and equals 47, the second value when the value decreases to 0 at the end, running through 47 again. The endKey() puts the value at the end of the condition you used for identification ($time == 47), which results in a single point in time.

To get the value to the end of the condition you could try to use the following formula:
 

$signal.aggregate(startValue(), ($time >= 47).removeLongerThan(1wk), endkey())

This will get a capsule starting at $time == 47 up to the end of the batch. StartValue() gets the value at the start of the capsule which is put at the end of the capsule using endKey().

Regards,

Thorsten

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...