AFAggregate.FrequencyDistribution(T) Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Generates a frequency distribution 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> FrequencyDistribution<T>( this IEnumerable<T> items, string groupedField ) where T : AFObject
<ExtensionAttribute> Public Shared Function FrequencyDistribution(Of T As AFObject) ( items As IEnumerable(Of T), groupedField As String ) As AFGroupedResult(Of Object) Dim items As IEnumerable(Of T) Dim groupedField As String Dim returnValue As AFGroupedResult(Of Object) returnValue = items.FrequencyDistribution(groupedField)
public: [ExtensionAttribute] generic<typename T> where T : AFObject static AFGroupedResult<Object^>^ FrequencyDistribution( IEnumerable<T>^ items, String^ groupedField )
[<ExtensionAttribute>] static member FrequencyDistribution : items : IEnumerable<'T> * groupedField : string -> 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.
Type Parameters
- T
- The type of items to summarize
Return Value
Type: AFGroupedResultObjectA result containing the requested frequency distribution or an error if the summaries could not be performed.