Skip to Main Content
AVEVA Product Feedback


Status Completed
Created by Guest
Created on Aug 20, 2022

EventCount() with value filter

Currently EventCount() returns the number of values that a particular attribute contains for given time range.  However, there is no way to have an attribute value filter.  Use case: I want to be able to easily count the number of times my state tag = "Fault" for the past month. Adding a value filter to the EventCount() function, like TimeEq() has, would allow me to do this.
  • ADMIN RESPONSE
    Aug 20, 2022
    This is now possible with the analysis arrays and associated functions introduced with the AF 2018 release. Specifically, you can now use the RecordedValues() or RecordedValuesByCount() function along with the FilterData() function to accomplish this request.
  • Attach files
  • Guest
    Reply
    |
    Aug 20, 2022
    Missing the ability to filter any AF analytic function based on an attribute value. We are still using PI totalizer to get event count and averages when a filter is required.
  • Guest
    Reply
    |
    Aug 20, 2022
    In response to Daniel Gougeon, "Missing the ability to filter any AF ana..." What is the function of PI totalizer in PI System Explorer?
  • Guest
    Reply
    |
    Aug 20, 2022
    In response to Roy Nolf, "What is the function of PI totalizer in ..." We need to use PI Totalizer class tags to be able to average a variable with a filter expression. We cannot perform this type of filtering with PI AF and PI System Explorer.
  • Guest
    Reply
    |
    Aug 20, 2022
    In response to Daniel Gougeon, "We need to use PI Totalizer class tags t..." Thanks Daniel.
  • Guest
    Reply
    |
    Aug 20, 2022
    Hi Stepen, is it possible to find more details on the solution that you are describing ? Is there a kb available?
  • Guest
    Reply
    |
    Aug 20, 2022
    Hi, there is no kb on this as it's standard capability shipped in the 2018 release. A good place to start is our LiveLibrary online documentation. Select the PI Server 2018 documentation and search for RecordedValues, RecordedValuesByCount and FilterData. Let me know if you need anything else.