Hi all, I'm trying to use the Retrieval Methods to calculated the average and standard deviation (the event weighted ones) with an specific time range

for example:

StartTime: 2018/10/10 15:06:00EndTime: 2018/10/10 15:46:00

Those date could be change by the user. So, I create two attributes StartTime and EndTime to let the user change it if they want.And use relative expression to define the time range.

I've been review the PI square and I only find examples with moving time windows, like '*'- 10m. But no with any Full Time Range .Is there a way to configure this in a Retrieval Method? Is it possible?And if is not, can you guys suggest me another way to calculate this?

4) Create a new Output attribute, select No to Saving History, give it an attribute name.

(I'm assuming here that you don't want to save the output to a PI Point.)

In PI System Explorer, you can now change StartTime and EndTime, then refresh PSE and you should get an answer in your output attribute. You can also use this output attribute in clients such as PI Vision.

Warning: depending on the time range and other factors, this may cause a large number of values to be retrieved from the PI Data Archive affecting clients and overall performance. Be especially careful if you're going trend this output attribute (not sure it makes sense for anyone to trend this output attribute as the inputs require someone to change their values.)

Thank you for your reply Kwan.I've been reviewing this approach by my self and seems is going to work.What I miss from my original question is to add the standard deviation calculation, with the same features as the average (Related to the selection time range).I founded the in the Analysis StDev function, but this is the time-weighted. And I need to calculate the event weighted.

Unfortunately there isn't another way to calculate an event weighted standard deviation. Practically all of the summary calculation functions available in PI analytics are time-weighted in basis, the exception being TagMean. The method that was discussed in SStDev computation of a tag within a timeframe? (PI AF Analysis) using PI AF 2018 is the only way I've found that you can get an event weighted standard deviation using Analytics.