AnsweredAssumed Answered

How to pass filteredsummary filterexpression dynamically c

Question asked by vijayksingh on Aug 24, 2017
Latest reply on Aug 24, 2017 by rdavin

Hello All,

 

I want to calculate filtered summary (average) with filter as tagname>0, I am trying below method but not able to get the required value.

 

 

var attrPIPoint = attr.PIPoint;

 

string filterText = string.Concat("'\\", attrPIPoint.Server.Name, "\\",attrPIPoint.Name,"'>0");

 

var results = attr.Data.FilteredSummaries(timeRange, timeSpan, filterText, AFSummaryTypes.Average, AFCalculationBasis.TimeWeighted, AFSampleType.Interval, timeSpan, AFTimestampCalculation.Auto);

 

I want to pass filterText (Highlighted in Red) Dynamically based on current AFAttribute Referenced PITag like @"'\\PISERVER\VC IIIK_Lab_CBA_Al2O3_QL'>0"

 

 

Using Above code I am getting below error

Either this : Unrecognized variable '\\IP OF Server\\TagName' in expression. or

               [-11101] All data events are filtered in summary calculation

 

Thanks in Advance.

 

 

 

 

 

 

 

Outcomes