AnsweredAssumed Answered

How to get the Max , min, avg from PI AF sdk for a tag

Question asked by mdspath on Jan 18, 2019
Latest reply on Jan 23, 2019 by mdspath



I am interested in getting only the Max , min, avg from PI AF sdk for a given tag but not the whole data like the below code


var config = new PIPagingConfiguration(PIPageType.TagCount, 10); 
IEnumerable<IDictionary<AFSummaryTypes, AFValues>> listAvgResults =  
        pointList.Summaries(myTimeRange, span, type, AFCalculationBasis.TimeWeighted, AFTimestampCalculation.Auto, config); 
IEnumerable<AFValues> afValues = listAvgResults.Select(pointResults => pointResults[type]); 

foreach (AFValues pointValues in afValues) 
    // constructing the data table here