Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAggregate.GroupedSummary(T) Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAggregate.GroupedSummary(T) Method
Generates a summary broken down by group for the specified items.

Namespace:  OSIsoft.AF.Data.Aggregate
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static AFGroupedResult<Object> GroupedSummary<T>(
	this IEnumerable<T> items,
	string groupedField,
	string summaryField,
	AFSummaryTypes summaryTypes
)
where T : AFObject
<ExtensionAttribute>
Public Shared Function GroupedSummary(Of T As AFObject) ( 
	items As IEnumerable(Of T),
	groupedField As String,
	summaryField As String,
	summaryTypes As AFSummaryTypes
) As AFGroupedResult(Of Object)

Dim items As IEnumerable(Of T)
Dim groupedField As String
Dim summaryField As String
Dim summaryTypes As AFSummaryTypes
Dim returnValue As AFGroupedResult(Of Object)

returnValue = items.GroupedSummary(groupedField, 
	summaryField, summaryTypes)
public:
[ExtensionAttribute]
generic<typename T>
where T : AFObject
static AFGroupedResult<Object^>^ GroupedSummary(
	IEnumerable<T>^ items, 
	String^ groupedField, 
	String^ summaryField, 
	AFSummaryTypes summaryTypes
)
[<ExtensionAttribute>]
static member GroupedSummary : 
        items : IEnumerable<'T> * 
        groupedField : string * 
        summaryField : string * 
        summaryTypes : AFSummaryTypes -> AFGroupedResult<Object>  when 'T : AFObject

Parameters

items
Type: System.Collections.GenericIEnumerableT
The items that should be summarized.
groupedField
Type: SystemString
The field whose value should be grouped.
summaryField
Type: SystemString
The field that should be summarized for each group.
summaryTypes
Type: OSIsoft.AF.DataAFSummaryTypes
The types of summaries to perform for each group.

Type Parameters

T
The type of items to summarize

Return Value

Type: AFGroupedResultObject
A result containing the grouped summary or an error if the summaries could not be performed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in