
Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
Rick Davin May 2, 2018 2:25 PM (in response to DanielDavalilloKBC)Hi Daniel,
You really can't average the event frame. Rather you can average an attribute over the time range of that event frame. The limitation is that the attribute must be a PIPoint.
In the PI Analytics and PE, there is a TagAvg function that produces a timeweighted average. There is also a TagMean function that produces an eventweighted average. I am guessing you want something similar to TagMean.
This functionality is available in the PI Point data reference but with different wording that you are probably expecting. It's still called an Average but you must declare it to be Event Weighted:

Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
DanielDavalilloKBC May 2, 2018 2:50 PM (in response to Rick Davin)Hi Rick, Thanks a lot for your prompt response.
I meant the functions options (By the Time Range) for an attribute over the time range of that event frame. I am looking for a workaround option to the Median By the Time Range. In summary, I need to implement the Median as an addition function of the function listed below.

Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
Dan Fishman May 2, 2018 3:23 PM (in response to DanielDavalilloKBC)Median is currently not supported and you will see a number of people have requested this. Also, using output points on the Event Frame (introduced in AF 2017 R2 package) will not work since there is no median function! You can find a user voice post on this here.
I hope that the upcoming release of AF supports median with the array functions. I would imagine you could order the results and then take select the "middle" item. You can preview the array functions here: Sneak Peek at AF 2018 with Asset Analytics: Arrays .

Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
Rick Davin May 2, 2018 3:51 PM (in response to Dan Fishman)The problem with the arrays is that an analysis can't run on an event frame. A formula is insufficient as well. A custom data reference would work but sometimes is not the best with performance. Then again overall performance would be less than optimal since the solution likely requires a sorted list.

Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
Dan Fishman May 2, 2018 3:56 PM (in response to Rick Davin)Rick, I was thinking to run the analysis using arrays similar to here: First look at AF Analysis Service 2017 R2 with Event Frames . Of course, I'm not sure what will actually be supported for the array functions!

Re: PI Evet Frames Questions. I would like to see the Median of the event frame and not the Average. Is it possible to calculate the Median of the event frame? I am not sure how to go about calculating this based off of the options from AF
Rick Davin May 2, 2018 4:05 PM (in response to Dan Fishman)That might work. Technically the analysis is being run on the element, but thanks to the new Outputs at close feature this has potential. Unless there is a new TagMedian function, the trick is still fetching the recorded values and then sorting that list.




