As an analytics user, I would like to be able to have the output time stamp for my expression and roll up analyses decided at evaluation time based on the time stamp of another attribute.
I prefer the expression over only an attribute. Using an expression you can also take data from AF attributes, but also add any required business logic based on the context provided by the analysis.
An example use case is to calculate the derivative of a totalizer function in real time. To be completely correct, the derivative must be a step function, and the slope of the interpolation line between any 2 consecutive events must be outputted at the timestamp of the earlier event due to the way that PI interpolates for step functions.
Another use case is to save lab results (identified by batch number) such that they align with the tag that tracks the batch numbers over time (step = on). Lab results will only be available well after the batch has ended, so a user must be able save lab results at the timestamp when the batch number equals the batch number of the lab result if they want to avoid repeated backfilling.
In the scheduling options for analyses in PI System Explorer, it would be useful, in the "Advanced..." options menu for Output Time Stamp, to have the ability to set it based on the result of PI expression. For example, set it to the timestamp of the previous event of a tag:
PrevEvent('someTag,'*')
@Stephen Kwan: Will it in the new AF release only be possible to use a timestamp variable or also a string variable that can be evaluated to a timestamp?
@Holger - specifically, I am referring to a Variable when you configure an Expression. As long as the Variable evaluates to a valid timestamp, then you can use that as your output time stamp.