When accessing aggregated data using the HistoryRead or the CreateMonitoredItems Service, the following rules are used to handle specific Aggregate use cases.
If ProcessingInterva l is 0, the Server shall create one Aggregate value for the entire time range. This allows Aggregates over large periods of time. A value with a timestamp equal to endTime will be excluded from that Aggregate, just as it would be excluded from an interval with that ending time. If the ProcessingInterval of 0 is passed in the MonitoredItemFilter it shall be revised to a suitable nonzero value.
The timestamp returned with the Aggregate shall be the time at the beginning of the interval, except where the Aggregate specifies a different timestamp.
If a requested timestamp is set to anything but the source timestamp the operation shall return the Bad_TimestampToReturnInvalid StatusCode. If a requested timestamp is not supported in any other way for a HistoricalDataNode, the operation shall return the Bad_TimestampNotSupported StatusCode. For MonitoredItem the Server shall not return past data if a requested timestamp is not supported by the history collection.
StatusCodes for an Aggregate value shall take into account the values used to calculate them. In addition, the configuration parameters PercentDataGood and PercentDataBad allow the client to control how this calculation is done if supported by the Server.
If an Aggregate operates on raw values (e.g. Average) the calculation is done by counting values. If an Aggregate operates on raw values but can also return a Bounding Value then the Bounding Values are included in the count when computing the StatusCode. If an Aggregate does any sort of a time weighted calculation (e.g. TimeAverage or TimeAverage2) then the StatusCode calculation shall also be time weighted.
For purposes of calculating time weighted StatusCodes each interval shall be divided into regions of Good or Bad data. Creating these regions requires that the bounding values be calculated for each interval and the type of bounding value depends on the Aggregate.
Use the following to determine the StatusCode of a given aggregate. If TreatUncertainAsBad = False then Uncertain regions are included with the Good regions when calculating the above ratios, if the TreatUncertainAsBad = True then the Uncertain regions are included as Bad regions. If no Bad regions are in the interval then the StatusCode for the interval is Good. For any intervals containing regions where the StatusCodes are Bad, the total duration of all Bad regions is calculated and divided by the width of the interval. The resulting ratio is multiplied by 100 and compared to the PercentDataBad parameter. The StatusCode for the interval is Bad if the ratio is greater than or equal to the PercentDataBad parameter. For any interval which is not Bad, the total duration of all Good regions is then calculated and divided by the width of the interval. The resulting ratio is multiplied by 100 and compared to the PercentDataGood parameter. The StatusCode for the interval is Good if the ratio is greater than or equal to the PercentDataGood parameter. If for an interval neither ratio applies then that interval is Uncertain_DataSubNormal.
If there is no data in the interval and the interval is inside the range [start of data, end of data] and the Aggregate return data type is raw data type then the StatusCodes for the interval will be Bad_NoData unless an alternate status code is defined for a specific Aggregate.
The width of an interval is the ProcessingInterval unless it is a partial interval (i.e. has the Partial bit set). In these cases, the width is the time used when calculating the partial interval.
Subclauses 5.4.3.2.2 and 5.4.3.2.3 include diagrams that illustrate a request and data series. The colour of the time axis indicates the status for different regions. Red indicates Bad, green indicates Good and orange indicates Uncertain. These examples assume TreatUncertainAsBad = False.
Figure 2 illustrates a data series for Variable with Stepped = False and an Aggregate that uses Simple Bounding Values. The request being processed has a Start Time that falls before the first point in the series and an End Time that does not fall on an integer multiple of the ProcessingInterval.
Figure 2 – Variable with Stepped = False and Simple Bounding Values
The first interval has four regions:
 the period before the first data point;
 the period between the first and second where SlopedInterpolation can be used;
 the period between the second and third point where SteppedInterpolation is used;
 the period after the Bad point where no data exists.
A region is Uncertain if a region ends in a Bad or Uncertain value and SlopedInterpolation is used. The end point has no effect on the region if SteppedInterpolation is used.
The second interval has three regions:
 the period before the first Good data point where no data exists;
 the period between the first and second where SlopedInterpolation can be used;
 the period between the second point and the bound calculated with SlopedInterpolation.
The third interval has three regions:
 the period between the simple bound and the first data point;
 the period between the first point and an interpolated point that falls on the end time;
 the period after the end time which is ignored.
This is a partial region and the data after the end time is not used, however, if sloped interpolation is used and the point after the endpoint is Uncertain then the region between the last point and the end time will be Uncertain.
Figure 3 illustrates a data series for Variable with Stepped = True and an Aggregate that uses Interpolated Bounding Values. The request being processed has a Start Time that falls before the first point in the series and an End Time that does not fall on an integer multiple of the ProcessingInterval.
Figure 3 – Variable with Stepped = True and Interpolated Bounding Values
The first interval has three regions:
 the period before the first data point;
 the period between the first and second where SteppedInterpolation is used;
 the period between the second and the interpolated end bound.
The Bad point is ignored because of the interpolated end bound but this does create Uncertain regions. If SlopedInterpolation was used the Uncertain region would start at the second point. In this case, it only starts when the first Bad value is ignored.
The second interval has three regions:
 the period between the start bound and the first data point;
 the period between the first and second where SteppedInterpolation is used;
 the period between the second and the interpolated end bound.
The third interval has three regions:
 the period between the interpolated bound and the first data point;
 the period between the first point and an interpolated point that falls on the end time;
 the period after the end time which is ignored.
This is a partial region and the data after the end time is not used.
Subclause 5.4.3.3 deals with Aggregate specific characteristics and behaviour that is specific to a particular Aggregate.
Each subclause has a table which formally expresses the Aggregate behaviour (including any exceptions). The meaning of each of the fields in the table is described in Table 14.
Description of Table 14:
 The first column is the common name for the item.
 The second column includes a description of the item and a list of the valid selections with for the item including a description of each selection.
 The second part of the table describes how the status associated with the Aggregate calculation is computed.
 The last part of the table lists what behaviour is expected from the Aggregate for some common special cases. These behaviours require text descriptions so there is no list of valid selections.
Table 14 – Aggregate table description
Aggregate Characteristics 

Type 
The type of Aggregate. <Interpolated  Calculated  Raw>
Interpolated: See definition for Interpolated. Calculated: Computed from defined calculation. Raw: Selects a raw value from within an interval. 
Data Type 
The data type of the result. <Double  Int32  Same as Source> 
Use Bounds 
How the Aggregate deals with bounds. <None  Interpolated  Simple>
None: Bounds do not apply to the Aggregate. Interpolated: Uses Interpolated Bounds. Simple: Uses Simple Bounds. 
Timestamp 
What is the time stamp of the resulting Aggregate value:
startTime: The time at the start of the interval. endTime: The time at the end of the interval. Raw: The time associated with a value in the interval. 


StatusCode Calculations 

Calculation Method 
How the status code is calculated: <PercentValues  PercentTime  Custom>
PercentValues: Based on percentage of value counts. PercentTime: Based on percentage of time interval. Custom: Specific to the Aggregate (description included). 
Partial 
For partial intervals does the Aggregate set this bit <Set Sometimes  Not Set>
It may also describe any special cases for setting this bit 
Calculated 
Describes the usage of the calculated bit. <Set Always  Set Sometimes  Not Set>
Set Always: The bit is always set. Set Sometimes: The bit is sometimes set (describes when). Not Set: The bit is never set. 
Interpolated 
Describes the usage of the interpolated bit. <Set Always  Set Sometimes  Not Set>
Set Always: The bit is always set. Set Sometimes: The bit is sometimes set (describes when). Not Set: The bit is never set. 
Raw 
Describes the usage of the Raw bit. <Set Always  Set Sometimes  Not Set>
Set Always: The bit is always set. Set Sometimes: The bit is sometimes set (describes when). Not Set: The bit is never set. 
Multi Value 
Describes the usage of the multi value bit. <Set Sometimes  Not Set>
Set Sometimes: The bit is used (see OPC 1000011). Not Set: The bit is never set. 


StatusCode Common Special Cases 

Before Start of Data 
If the entire interval is before the start of data. 
After End of Data 
If the entire interval is after the end of data (as determined by the Historian). 
Start Bound Not Found 
If the starting bound is not found for the earliest interval and it is not partial, then what, if any, special processing should be done. 
End Bound Not Found 
If the ending bound is not found for the latest interval and it is not partial, then what, if any, special processing should be done. 
Bound Bad 
If the Bounding value is Bad, then what, if any, special processing should be done. 
Bound Uncertain 
If the Bounding value is uncertain, then what, if any, special processing should be done. 
The Interpolative Aggregate defined in Table 15 returns the Interpolated Bounding Value (see 3.1.8) for the startTime of each interval.
When searching for Good values before or after the bounding value, the time period searched is Server specific, but the Server should search a time range which is at least the size of the ProcessingInterval.
Table 15 – Interpolative Aggregate summary
Interpolated Aggregate Characteristics 

Type 
Interpolated 
Data Type 
Same as Source 
Use Bounds 
Interpolated 
Timestamp 
StartTime 


StatusCode Calculations 

Calculation Method 
Custom Good if no Bad values skipped and Good values are used, Uncertain if Bad values skipped or if Uncertain values are used. If no starting value then Bad_NoData. See description of Interpolated Bounds (see 3.1.8) for more details 
Partialbit 
Not Set 
Calculated bit 
Not Set 
Interpolated bit 
Set Sometimes Always set except for when the Raw bit is set 
Raw bit 
Set Sometimes If a value exists with the exact time of interval Start 
Multi Value bit 
Not Set 


StatusCode Common Special Cases 

Before Start of Data 
Return Bad_NoData 
After End of Data 
Return extrapolated value (see 3.1.8) (sloped or stepped according to settings) Status code is Uncertain_DataSubNormal. 
Start Bound Not Found 

End Bound Not Found 

Bound Bad 
Does not return a Bad bound except as noted above 
Bound Uncertain 
Returned Uncertain_DataSubNormal if any Bad value(s) was/were skipped to calculate the bounding value. 
The Average Aggregate defined in Table 16 adds up the values of all Good Raw data for each interval, and divides the sum by the number of Good values. If any nonGood values are ignored in the computation, the Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3). This Aggregate is not time based so the PercentGood/PercentBad applies to the number of values in the interval.
Table 16 – Average Aggregate summary
Average Aggregate Characteristics 

Type 
Calculated 
Data Type 
Double 
Use Bounds 
None 
Timestamp 
StartTime 


StatusCode Calculations 

Calculation Method 
PercentValues 
Partial 
Not Set 
Calculated 
Set Always 
Interpolated 
Not Set 
Raw 
Not Set 
Multi Value 
Not Set 


StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 
After End of Data 
Bad_NoData 
No Start Bound 
Bounds not used 
No End Bound 
Bounds not used 
Bound Bad 
Bounds not used 
Bound Uncertain 
Bounds not used 
The TimeAverage Aggregate defined in Table 17 uses Interpolated Bounding Values (see 3.1.8) to find the value of a point at the beginning and end of an interval. Starting at the starting bounding value a straight line is drawn between each value in the interval ending at the ending bounding value (see examples for illustrations). The area under the lines is divided by the length of the ProcessingInterval to yield the average. Note that this calculation always uses a sloped line between points; TimeAverage2 uses a stepped or sloped line depending on the value of the Stepped Property for the Variable.
If one or more Bad Values exist in the interval then they are omitted from the calculation and the StatusCode is set to Uncertain_DataSubNormal. Sloped lines are drawn between the Good values when calculating the area.
The time resolution used in this calculation is Server specific.
Table 17 – TimeAverage Aggregate summary
TimeAverage Aggregate Characteristics 

Type 
Calculated 
Data Type 
Double 
Use Bounds 
Interpolated 
Timestamp 
StartTime 


StatusCode Calculations 

Calculation Method 
Custom Good if no Bad values skipped and Good values are used, Uncertain if Bad values are skipped or if Uncertain values are used 
Partial 
Set Sometimes If an interval is not a complete interval 
Calculated 
Set Always 
Interpolated 
Not Set 
Raw 
Not Set 
Multi Value 
Not Set 


StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 
After End of Data 
Value extrapolated, Uncertain status 
No Start Bound 
Calculate Partial Interval 
No End Bound 
Extrapolate data, Uncertain status 
Bound Bad 
NA 
Bound Uncertain 
NA 
The TimeAverage2 Aggregate defined in Table 18 uses Simple Bounding Values (see 3.1.9) to find the value of a point at the beginning and end of an interval. Starting at the starting bounding value a straight line is drawn between each value in the interval ending at the ending bounding value (see examples for illustrations). The area under the lines is divided by the length of the ProcessingInterval to yield the average. Note that this calculation uses a stepped or sloped line depending on what the value of the Stepped Property for the Variable; TimeAverage always uses a sloped line between points.
The time resolution used in this calculation is Server specific.
If any nonGood data exists in the interval, this data is omitted from the calculation and the time interval is reduced by the duration of the nonGood data; i.e. if a value was Bad for 1 minute in a 5minute interval then the TimeAverage2 would be the area under the 4minute period of Good values divided by 4 minutes. If a subinterval ends at a Bad value then only the Good starting value is used to calculate the area of subinterval preceding the Bad value.
The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3).
Table 18 – TimeAverage2 Aggregate summary
TimeAverage2 Aggregate Characteristics 

Type 
Calculated 
Data Type 
Double 
Use Bounds 
Simple 
Timestamp 
StartTime 


StatusCode Calculations 

Calculation Method 
PercentTime 
Partial 
Set Sometimes If an interval is not a complete interval 
Calculated 
Set Always 
Interpolated 
Not Set 
Raw 
Not Set 
Multi Value 
Not Set 


StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 
After End of Data 
Bad_NoData 
No Start Bound 
Bound is Bad_NoData and treated as any other Bad value in the interval 
No End Bound 
Bound is Bad_NoData and treated as any other Bad value in the interval 
Bound Bad 
Treated as any other Bad value in the interval 
Bound Uncertain 
Treated as any other Uncertain value in the interval 
The Total Aggregate defined in Table 19 performs the following calculation for each interval:
Total = TimeAverage x ProcessingInterval (seconds)
where: TimeAverage is the result from the TimeAverage Aggregate, using the ProcessingInterval supplied to the Total call.
The resulting units would be normalized to seconds, i.e. [TimeAverage Units] x seconds.
The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3).
Note that this calculation always uses a SlopedInterpolation between points; Total2 uses a Stepped Attribute or SlopedInterpolation depending on the value of the Stepped Attribute for the Variable.
Table 19 – Total Aggregate summary
Total Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
Interpolated 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Good if no Bad values are skipped and Good values are used, Uncertain if Bad values are skipped or if Uncertain values are used 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Value extrapolated, Uncertain status 

No Start Bound 
Calculate Partial Interval 

No End Bound 
Extrapolate data, Uncertain status 

Bound Bad 
NA 

Bound Uncertain 
NA 
The Total2 Aggregate defined in Table 20 performs the following calculation for each interval:
Total2 = TimeAverage2 x ProcessingInterval of Good data (seconds)
where TimeAverage2 is the result from the TimeAverage2 Aggregate, using the ProcessingInterval supplied to the Total2 call.
The interval of Good data is the sum of all subintervals where nonBad data exists; i.e. if a value was Bad for 1 minute in a 5minute interval then the interval of Good data would be the 4minute period.
The resulting units would be normalized to seconds, i.e. [TimeAverage2 Units] x seconds.
The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3).
Table 20 – Total2 Aggregate summary
Total2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Value for Bound is Bad_NoData and is treated like any other Bad quality value in the calculation (ignored) 

No End Bound 
Value for Bound is Bad_NoData and is treated like any other Bad quality value in the calculation (ignored) 

Bound Bad 
Value is treated like any other Bad quality value in the calculation (ignored) 

Bound Uncertain 
Value is treated like any other nonGood quality value in the calculation (ignored) 
The Minimum Aggregate defined in Table 21 retrieves the minimum Good raw value within the interval, and returns that value with the timestamp at the start of the interval. Note that if the same minimum exists at more than one timestamp the MultipleValues bit is set.
Unless otherwise indicated, StatusCodes are Good, Calculated. If the minimum value is on the start time the status code will be Good, Raw. If only Bad quality values are available then the status is returned as Bad_NoData.
The timestamp of the Aggregate will always be the start of the interval for every ProcessingInterval.
Table 21 – Minimum Aggregate summary
Minimum Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom If no Bad values then the Status is Good. If Bad values exist then the Status is Uncertain_SubNormal. If an Uncertain value is less than the minimum Good value the Status is Uncertain_SubNormal. 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Sometimes If the Minimum value is not on the StartTime of the interval or if the Status was set to Uncertain_SubNormal because of nonGood values in the interval 

Interpolated 
Not Set 

Raw 
Set Sometimes If Minimum value is on the StartTime of the interval 

Multi Value 
Set Sometimes If multiple Good values exist with the Minimum value 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Not Applicable 

No End Bound 
Not Applicable 

Bound Bad 
Not Applicable 

Bound Uncertain 
Not Applicable 
The Maximum Aggregate defined in Table 22 retrieves the maximum Good raw value within the interval, and returns that value with the timestamp at the start of the interval. Note that if the same maximum exists at more than one timestamp the MultipleValues bit is set.
Unless otherwise indicated, StatusCodes are Good, Calculated. If the maximum value is on the interval start time the status code will be Good, Raw. If only Bad quality values are available then the status is returned as Bad_NoData.
The timestamp of the Aggregate will always be the start of the interval for every ProcessingInterval.
Table 22 – Maximum Aggregate summary
Maximum Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom If no Bad values then the Status is Good. If Bad values exist then the Status is Uncertain_SubNormal. If an Uncertain value is greater than the maximum Good value the Status is Uncertain_SubNormal 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Sometimes If the Maximum value is not on the startTime of the interval or if the Status was set to Uncertain_SubNormal because of nonGood values in the interval 

Interpolated 
Not Set 

Raw 
Set Sometimes If Maximum value is on the startTime of the interval 

Multi Value 
Set Sometimes If multiple Good values exist with the Maximum value 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Not Applicable 

No End Bound 
Not Applicable 

Bound Bad 
Not Applicable 

Bound Uncertain 
Not Applicable 
The MinimumActualTime Aggregate defined in Table 23 retrieves the minimum Good raw value within the interval, and returns that value with the timestamp at which that value occurs. Note that if the same minimum exists at more than one timestamp, the oldest one is retrieved and the Aggregate Bits are set to MultipleValues.
Table 23 – MinimumActualTime Aggregate summary
MinimumActualTime Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
Time of Minimum 



StatusCode Calculations 

Calculation Method 
Custom If no Bad values then the Status is Good. If Bad values exist then the Status is Uncertain_SubNormal. If an Uncertain value is less than the minimum Good value the Status is Uncertain_SubNormal 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Sometimes If the Status was set to Uncertain_SubNormal because of nonGood values in the interval 

Interpolated 
Not Set 

Raw 
Set Sometimes If a Good minimum value is returned 

Multi Value 
Set Sometimes If multiple Good values exist with the Minimum value 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Not Applicable 

No End Bound 
Not Applicable 

Bound Bad 
Not Applicable 

Bound Uncertain 
Not Applicable 
The MaximumActualTime Aggregate defined in Table 24 is the same as the MinimumActualTime Aggregate, except that the value is the maximum raw value within the interval. Note that if the same maximum exists at more than one timestamp, the oldest one is retrieved and the Aggregate Bits are set to MultipleValues.
Table 24 – MaximumActualTime Aggregate summary
MaximumActualTime Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
Time of Maximum 



StatusCode Calculations 

Calculation Method 
Custom If no Bad values then the Status is Good. If Bad values exist then the Status is Uncertain_SubNormal. If an Uncertain value is greater than the maximum Good value the Status is Uncertain_SubNormal 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Sometimes If the Status was set to Uncertain_SubNormal because of nonGood values in the interval 

Interpolated 
Not Set 

Raw 
Set Sometimes If a Good maximum value is returned 

Multi Value 
Set Sometimes If multiple Good values exist with the maximum value 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Not Applicable 

No End Bound 
Not Applicable 

Bound Bad 
Not Applicable 

Bound Uncertain 
Not Applicable 
The Range Aggregate defined in Table 25 finds the difference between the maximum and minimum Good raw values in the interval. If only one Good value exists in the interval, the range is zero. Note that the range is always zero or positive. If nonGood values are ignored when finding the minimum or maximum values or if Bad values exist then the status is Uncertain_DataSubNormal.
Table 25 – Range Aggregate summary
Range Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom If no Bad values then the Status is Good. If Bad values exist then the Status is Uncertain_SubNormal. If an Uncertain value is greater than the maximum or less than the minimum Good value the Status is Uncertain_SubNormal 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Not Applicable 

No End Bound 
Not Applicable 

Bound Bad 
Not Applicable 

Bound Uncertain 
Not Applicable 
The Minimum2 Aggregate defined in Table 26 retrieves the minimum Good value for each interval as defined for Minimum except that Simple Bounding Values are included. The Simple Bounding Values for the interval are found according to the definition of Simple Bounding Values (see 3.1.9). Any Bad values are ignored in the computation. The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3) for time based Aggregates. If a bounding value is returned then the status will indicate, Raw, Calculated or Interpolated.
If TreatUncertainAsBad is false and an Uncertain raw value is the minimum then that Uncertain value is used. Uncertain values are ignored otherwise.
If sloped interpolation is used and the End bound is the minimum value then End bound is used as the Minimum with the timestamp set to the startTime of the interval. The End bound is ignored in all other cases.
Table 26 – Minimum2 Aggregate summary
Minimum2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set SometimesSet unless the StartBound is the Minimum 

Interpolated 
Set Sometimes If an Interpolated bound is the Minimum 

Raw 
Set Sometimes If a raw value is the Minimum. 

Multi Value 
Set Sometimes If more than one Good values exist with the same 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The Maximum2 Aggregate defined in Table 27 retrieves the maximum Good value for each interval as defined for Maximum except that Simple Bounding Values are included. The Simple Bounding Values for the interval are found according to the definition of Simple Bounding Values (see 3.1.9). Any Bad values are ignored in the computation. The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3) for time based Aggregates. If a bounding value is returned then the status will indicate, Raw, Calculated or Interpolated.
If TreatUncertainAsBad is false and an Uncertain raw value is the maximum then that Uncertain value is used. Uncertain values are ignored otherwise.
If sloped interpolation is used and the End bound is the maximum value then End bound is used as the maximum with the timestamp set to the startTime of the interval. The End bound is ignored in all other cases.
Table 27 – Maximum2 Aggregate summary
Maximum2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Sometimes Set unless the StartBound is the Maximum 

Interpolated 
Set Sometimes If an Interpolated bound is the Maximum 

Raw 
Set Sometimes If a raw value is the Maximum. 

Multi Value 
Set Sometimes If more than one Good values exist with the same 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The MinimumActualTime2 Aggregate defined in Table 28 retrieves the minimum Good value for each interval as defined for MinimumActualTime except that Simple Bounding Values are included. The Simple Bounding Values for the interval are found according to the definition of Simple Bounding Values (see 3.1.9). Any Bad values are ignored in the computation. The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3) for time based Aggregates. If a bounding value is returned then the status will indicate, Raw, Calculated or Interpolated.
If TreatUncertainAsBad is false and an Uncertain raw value is the minimum then that Uncertain value is used. Uncertain values are ignored otherwise.
If sloped interpolation is used and the End bound is the minimum value then End bound is used as the minimum with the timestamp set to the EffectiveEndTime of the interval. The End bound is ignored in all other cases.
Table 28 – MinimumActualTime2 Aggregate summary
MinumumActualTime2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
Time of minimum 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Not Set 

Interpolated 
Set Sometimes If an Interpolated bound is the Minimum 

Raw 
Set Sometimes If a raw value is the Minimum 

Multi Value 
Set Sometimes If more than one Good values exist with the same value 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The MaximumActualTime2 Aggregate defined in Table 29 retrieves the maximum Good value for each interval as defined for MaximumActualTime except that Simple Bounding Values are included. The Simple Bounding Values for the interval are found according to the definition of Simple Bounding Values (see 3.1.9). Any Bad values are ignored in the computation. The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3) for time based Aggregates. If a bounding value is returned then the status will indicate, Raw, Calculated or Interpolated.
If TreatUncertainAsBad is false and an Uncertain raw value is the maximum then that Uncertain value is used. Uncertain values are ignored otherwise.
If sloped interpolation is used and the End bound is the maximum value then End bound is used as the maximum with the timestamp set to the EffectiveEndTime of the interval. The End bound is ignored in all other cases.
Table 29 – MaximumActualTime2 Aggregate summary
MaximumActualTime2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
Time of maximum 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Not Set 

Interpolated 
Set Sometimes If an Interpolated bound is the Maximum 

Raw 
Set Sometimes If a raw value is the Maximum 

Multi Value 
Set Sometimes If more than one value is equal to the Maximum 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The Range2 Aggregate defined in Table 30 finds the difference between the maximum and minimum values in the interval as returned by the Minimum2 and Maximum2 Aggregates. Note that the range is always zero or positive.
Table 30 – Range2 Aggregate summary
Range2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple (used in Minimum2 and Maximum2 calculations) 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom If Minimum2 or Maximum2 are Bad then the status is Bad_NoData. If Minimum2 or Maximum2 are Uncertain then the status is Uncertain_DataSubNormal. Good otherwise 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Handled by Minimum2 and Maximum2 

No End Bound 
Handled by Minimum2 and Maximum2 

Bound Bad 
Handled by Minimum2 and Maximum2 

Bound Uncertain 
Handled by Minimum2 and Maximum2 
The AnnotationCount Aggregate defined in Table 31 returns a count of all Annotations in the interval.
The StatusCodes are Good, Calculated.
Table 31 – AnnotationCount Aggregate summary
AnnotationCount Aggregate Characteristics 

Type 
Calculated 

Data Type 
Int32 (negative values are not allowed) 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Good unless the interval is before the start of data or after the end of data 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Does not apply 

Bound Bad 
Does not apply 

Bound Uncertain 
Does not apply 
The Count Aggregate defined in Table 32 retrieves a count of all the raw values within an interval. If one or more raw values are nonGood, they are not included in the count, and the Aggregate StatusCode is determined using the StatusCode Calculation (see 5.4.3) for nontime based Aggregates. If no Good data exists for an interval, the count is zero.
Unless otherwise indicated, StatusCodes are Good, Calculated.
Table 32 – Count Aggregate summary
Count Aggregate Characteristics 

Type 
Calculated 

Data Type 
Int32 (negative values are not allowed) 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentValues 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Does not apply 

Bound Bad 
Does not apply 

Bound Uncertain 
Does not apply 
The DurationInStateZero Aggregate defined in Table 33 returns the time Duration during the interval that the Variable was in the zero state. The Simple Bounding Values for the interval are used to determine initial value (start time < end time) or ending value (if start time > end time). If one or more raw values are nonGood, they are not included in the Duration, and the Aggregate StatusCode is determined using the StatusCode Calculation (see 5.3) for time based Aggregates. Duration is in milliseconds. Unless otherwise indicated, StatusCodes are Good, Calculated.
Table 33 – DurationInStateZero Aggregate summary
DurationInStateZero Aggregate Characteristics 

Type 
Calculated 

Data Type 
Duration 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The DurationInStateNonZero Aggregate defined in Table 34 returns the time Duration during the interval that the Variable was in the one state. The Simple Bounding Values for the interval are used to determine initial value (start time < end time) or ending value (if start time > end time). If one or more raw values are nonGood, they are not included in the Duration, and the Aggregate StatusCode is determined using the StatusCode Calculation (see 5.3) for time based Aggregates.
Duration is in milliseconds. Unless otherwise indicated, StatusCodes are Good, Calculated.
Table 34 – DurationInStateNonZero Aggregate summary
DurationInStateNonZero Aggregate Characteristics 

Type 
Calculated 

Data Type 
Duration 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentTime 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The NumberOfTransitions Aggregate defined in Table 35 returns a count of the number of transition the Variable had during the interval. If one or more raw values are Bad, they are not included in the count, and the Aggregate StatusCode is determined using the StatusCode Calculation (see 5.3) for nontime based Aggregates.
The earliest transition shall be calculated by comparing the earliest nonBad value in the interval to the previous nonBad value. A transition occurred if no previous nonBad value exists or if the earliest nonBad value is different. The endTime is not considered part of the interval, so a transition occurring at the endTime is not included.
Unless otherwise indicated, StatusCodes are Good, Calculated.
Table 35 – NumberOfTransitions Aggregate summary
NumberOfTransitions Aggregate Characteristics 

Type 
Calculated 

Data Type 
Int32 (negative values are not allowed) 

Use Bounds 
Custom, a nonBad value prior to the interval is used 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
PercentValues 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 





StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Treat the beginning value as Bad_NoData and compute the Aggregate 

No End Bound 
Treat the ending value as Bad_NoData and compute the Aggregate 

Bound Bad 
Use as value and compute the Aggregate as defined 

Bound Uncertain 
Use as value and compute the Aggregate as defined 
The Start Aggregate defined in Table 36 retrieves the earliest raw value within the interval, and returns that value and status with the timestamp at which that value occurs. If no values are in the interval then the StatusCode is Bad_NoData.
Table 36 – Start Aggregate summary
Start Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
Time of Raw Value 



StatusCode Calculations 

Calculation Method 
Custom The raw value status is returned 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Not Set 

Interpolated 
Not Set 

Raw 
Always 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Does not apply 

Bound Bad 
Does not apply 

Bound Uncertain 
Does not apply 
The End Aggregate defined in Table 37 retrieves the latest raw value within the interval, and returns that value and status with the timestamp at which that value occurs. If no values are in the interval then the StatusCode is Bad_NoData.
Table 37 – End Aggregate summary
End Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
Time of Raw Value 



StatusCode Calculations 

Calculation Method 
Custom The raw value status is returned 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Not Set 

Interpolated 
Not Set 

Raw 
Always 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Does not apply 

Bound Bad 
Does not apply 

Bound Uncertain 
Does not apply 
The Delta Aggregate defined in Table 38 retrieves the difference between the earliest and latest Good raw values in the interval. The Aggregate is negative if the latest value is less than the earliest value. The status is Uncertain_DataSubNormal if nonGood values are skipped while looking for the first or last values. The status is Good otherwise. The status is Bad_NoData if no Good raw values exist.
Table 38 – Delta Aggregate summary
Delta Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Uncertain_DataSubNormal if nonGood values are skipped while looking for the first or last values 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always


Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Does not apply 

Bound Bad 
Does not apply 

Bound Uncertain 
Does not apply 
The StartBound Aggregate defined in Table 39 returns the value and status at the StartTime for the interval by calculating the Simple Bounding Values for the interval (see 3.1.9).
Table 39 – StartBound Aggregate summary
StartBound Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom The status of the start bound. 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Not Set 

Interpolated 
Set Sometimes If the bound is interpolated 

Raw 
Set Sometimes If a value exists at the start time 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Bad_NoData 

No End Bound 
Does not apply 

Bound Bad 
Same as bound 

Bound Uncertain 
Same as bound 
The EndBound Aggregate defined in Table 40 returns the value and status at the EndTime for the interval by calculating the Simple Bounding Values for the interval (see 3.1.9).
The timestamp returned is always the start of the interval and Calculated bit is set.
Table 40 – EndBound Aggregate summary
EndBound Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom The status of the end bound. 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Does not apply 

No End Bound 
Bad_NoData 

Bound Bad 
Same as bound 

Bound Uncertain 
Same as bound 
The DeltaBounds Aggregate defined in Table 41 returns the difference between the StartBound and the EndBound Aggregates with the exception that both the start and end shall be Good. If the end value is less than the start value, the result will be negative. If the end value is the same as the start value the result will be zero. If the end value is greater than the start value, the result will be positive. If one or both values are Bad the return status will be Bad_NoData. If one or both values are Uncertain the status will be Uncertain_DataSubNormal.
Table 41 – DeltaBounds Aggregate summary
DeltaBounds Aggregate Characteristics 

Type 
Calculated 

Data Type 
Same as Source 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Good if both bounds are Good Uncertain_DataSubNormal if either bound is uncertain Bad_NoData if either bound is Bad 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
Bad_NoData 

No End Bound 
Bad_NoData 

Bound Bad 
Bad_NoData 

Bound Uncertain 
Uncertain_DataSubNormal 
The DurationGood Aggregate defined in Table 42 divides the interval into regions of Good and nonGood data. Each region starts with a data point in the interval. If that data point is Good the region is Good. The Aggregate is the sum of the duration of all Good regions expressed in milliseconds.
The status of the first region is determined by finding the first data point at or before the start of the interval. If no value exists, the first region is Bad.
Each Aggregate is returned with timestamp of the start of the interval. StatusCodes are Good, Calculated.
Table 42 – DurationGood Aggregate summary
DurationGood Aggregate Characteristics 

Type 
Calculated 

Data Type 
Duration 

Use Bounds 
Uses status of bounding value 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom StatusCode is always Good, Calculated 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The DurationBad Aggregate defined in Table 43 divides the interval into regions of Bad and nonBad data. Each region starts with a data point in the interval. If that data point is Bad the region is Bad. The Aggregate is the sum of the duration of all Bad regions expressed in milliseconds.
The status of the first region is determined by finding the first data point at or before the start of the interval. If no value exists, the first region is Bad.
Each Aggregate is returned with timestamp of the start of the interval. StatusCodes are Good, Calculated.
Table 43 – DurationBad Aggregate summary
DurationBad Aggregate Characteristics 

Type 
Calculated 

Data Type 
Duration 

Use Bounds 
Uses status of bounding value 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom StatusCode is always Good, Calculated 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The PercentGood Aggregate defined in Table 44 performs the following calculation:
PercentGood = DurationGood / ProcessingInterval x 100
where:
DurationGood is the result from the DurationGood Aggregate, calculated using the ProcessingInterval supplied to PercentGood call.
ProcessingInterval is the duration of interval.
If the last interval is a partial interval then the duration of the partial interval is used in the calculation. Each Aggregate is returned with timestamp of the start of the interval. StatusCodes are Good, Calculated.
Table 44 – PercentGood Aggregate summary
PercentGood Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double (percent) 

Use Bounds 
Simple (used in DurationGood calculation) 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The PercentBad Aggregate defined in Table 45 performs the following calculation:
PercentBad = DurationBad / ProcessingInterval x 100
where:
DurationBad is the result from the DurationBad Aggregate, calculated using the ProcessingInterval supplied to PercentBad call.
ProcessingInterval is the duration of interval.
If the last interval is a partial interval then the duration of the partial interval is used in the calculation. Each Aggregate is returned with timestamp of the start of the interval. StatusCodes are Good, Calculated.
Table 45 – PercentBad Aggregate summary
PercentBad Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double (percent) 

Use Bounds 
Simple (used in DurationBad calculation) 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good. 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The WorstQuality Aggregate defined in Table 46 returns the worst status of the raw values in the interval where a Bad status is worse than Uncertain, which is worse than Good. No distinction is made between the specific reasons for the status. The server shall ignore the TreatUncertainAsBad for this aggregate.
If multiple values exist with the worst quality the MultipleValues bit is set. If multiple values exist with the worst quality but different StatusCodes then the StatusCode of the first value is returned.
This Aggregate returns the worst StatusCode as the value of the Aggregate.
The timestamp is always the start of the interval. The StatusCodes are Good, Calculated.
Table 46 – WorstQuality Aggregate summary
WorstQuality Aggregate Characteristics 

Type 
Calculated 

Data Type 
StatusCode 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Used 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The WorstQuality2 Aggregate defined in Table 47 returns the worst status of the raw values in the interval where a Bad status is worse than Uncertain, which is worse than Good. No distinction is made between the specific reasons for the status. The server shall ignore the TreatUncertainAsBad for this aggregate.
The start bound calculated using Simple Bounding Values (see 3.1.9) is always included when determining the worst quality.
If multiple values exist with the worst quality the MultipleValues bit is set. If multiple values exist with the worst quality but different StatusCodes then the StatusCode of the first value is returned.
This Aggregate returns the worst StatusCode as the value of the Aggregate.
The timestamp is always the start of the interval. The StatusCodes are Good, Calculated.
Table 47 – WorstQuality2 Aggregate summary
WorstQuality2 Aggregate Characteristics 

Type 
Calculated 

Data Type 
StatusCode 

Use Bounds 
Simple 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Used 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The StandardDeviationSample Aggregate defined in Table 48 uses the formula:
where X is each Good raw value in the interval, Avg(X) is the average of the Good raw values, and n is the number of Good raw values in the interval.
For every interval where n = 1, a value of 0 is returned.
If any nonGood values were ignored, the Aggregate quality is uncertain/subnormal.
All interval Aggregates return timestamp of the start of the interval. Unless otherwise indicated, qualities are Good, Calculated.
This calculation is for a sample population where the calculation is done on a subset of the full set of data. Use StandardDeviationPopulation to calculate the standard deviation of a full set of data (see 5.4.3.39). An example would be when the underlying data is sampled from the data source versus stored on an exception basis.
Table 48 – StandardDeviationSample Aggregate summary
StandardDeviationSample Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 

Conformance Units 

Aggregates StandardDeviationSample 
The VarianceSample Aggregate defined in Table 49 retrieves the square of the standard deviation. Its behaviour is the same as the StandardDeviationSample Aggregate. Unless otherwise indicated, qualities are Good, Calculated.
This calculation is for a sample population where the calculation is done on a subset of the full population. Use VariancePopulation to calculate the variance of a full set of data (5.4.3.40).
Table 49 – VarianceSample Aggregate summary
VarianceSample Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The StandardDeviationPopulation Aggregate defined in Table 50 uses the formula:
where X is each Good raw value in the interval, Avg(X) is the average of the Good raw values, and n is the number of Good raw values in the interval.
For every interval where n = 1, a value of 0 is returned.
If any nonGood values were ignored, the Aggregate quality is uncertain/subnormal.
All interval Aggregates return timestamp of the start of the interval. Unless otherwise indicated, qualities are Good, Calculated.
This calculation is for a full population where the calculation is done on the full set of data. Use StandardDeviationSample to calculate the standard deviation of a subset of the full population (5.4.3.37). An example would be when the underlying data is collected on an exception basis versus sampled from the data source.
Table 50 – StandardDeviationPopulation Aggregate summary
StandardDeviationPopulation Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 
The VariancePopulation Aggregate defined in Table 51 retrieves the square of the standard deviation. Its behaviour is the same as the StandardDeviationPopulation Aggregate. Unless otherwise indicated, qualities are Good, Calculated.
This calculation is for a full population where the calculation is done on the full set of data. Use VarianceSample to calculate the variance of a subset of the full population (5.4.3.38).
Table 51 – VariancePopulation Aggregate summary
VariancePopulation Aggregate Characteristics 

Type 
Calculated 

Data Type 
Double 

Use Bounds 
None 

Timestamp 
StartTime 



StatusCode Calculations 

Calculation Method 
Custom Always Good 

Partial 
Set Sometimes If an interval is not a complete interval 

Calculated 
Set Always 

Interpolated 
Not Set 

Raw 
Not Set 

Multi Value 
Not Set 



StatusCode Common Special Cases 

Before Start of Data 
Bad_NoData 

After End of Data 
Bad_NoData 

No Start Bound 
No special handing required 

No End Bound 
No special handing required 

Bound Bad 
No special handing required 

Bound Uncertain 
No special handing required 