Is there a way to do an EventCount on a FilterData?
Yes, this is possible. The PI Data Archive supports making summary calls to obtain an event count with a filter. I am unsure of the context surrounding your question.
So here is what I am trying to do.
RecordValues - RecordedValues('Truck Loaded Product Code','y+8h','y+24h-1m') - Works fine, of course.FilterData - FilterData(cAllProductCodesFines, $val = "Fines") - Works Fine, as is.
Combined - EventCount(FilterData(cAllProductCodesToday, $val = "Fines"),'y+8h','y+24h-1m') - Fails due to "must be an AF Attribute, referring to me using the variable name, not an attriubute.If make an Attribute, it then gives me the typical error, "Functions such as RecordedValues are not supported unless all mapped outputs are configured to save output history." But Arrays cannot be saved as output, I know I am overlooking something easy...
Am I correct in that you are trying to count the number of values in the FilterData() call? If so, try using ArrayLength() to count the events in the array. I was able to use a variable name in my FilterData() function.
See, I knew I was missing the obvious.
No problem. It's a newer function so we're all learning. I really like your analysis approach and that may be something I'll remember for future projects.
Retrieving data ...