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

AF SDK Reference

AFGroupingRequest(TGroup).BinBy(TBin) Method (String, IEnumerable(TBin), UOM)

AFGroupingRequest(TGroup).BinBy(TBin) Method (String, IEnumerable(TBin), UOM)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFGroupingRequest(TGroup).BinBy(TBin) Method (String, IEnumerable(TBin), UOM)
Creates a compound grouping with this aggregate partitioned into bins of the specified field.

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

Syntax

public AFCompoundPartitioningRequest<AFRange<TBin>, TGroup> BinBy<TBin>(
	string field,
	IEnumerable<TBin> bins,
	UOM binUOM
)
where TBin : Object, IComparable<TBin>
Public Function BinBy(Of TBin As {Object, IComparable(Of TBin)}) ( 
	field As String,
	bins As IEnumerable(Of TBin),
	binUOM As UOM
) As AFCompoundPartitioningRequest(Of AFRange(Of TBin), TGroup)

Dim instance As AFGroupingRequest
Dim field As String
Dim bins As IEnumerable(Of TBin)
Dim binUOM As UOM
Dim returnValue As AFCompoundPartitioningRequest(Of AFRange(Of TBin), TGroup)

returnValue = instance.BinBy(field, bins, 
	binUOM)
public:
generic<typename TBin>
where TBin : Object, IComparable<TBin>
AFCompoundPartitioningRequest<AFRange<TBin>^, TGroup>^ BinBy(
	String^ field, 
	IEnumerable<TBin>^ bins, 
	UOM^ binUOM
)
member BinBy : 
        field : string * 
        bins : IEnumerable<'TBin> * 
        binUOM : UOM -> AFCompoundPartitioningRequest<AFRange<'TBin>, 'TGroup>  when 'TBin : Object and IComparable<'TBin>

Parameters

field
Type: SystemString
The field whose values should be binned.
bins
Type: System.Collections.GenericIEnumerableTBin
The endpoints of the bins.
binUOM
Type: OSIsoft.AF.UnitsOfMeasureUOM
The units of measure for the bin values.

Type Parameters

TBin
The type of bins to partition by.

Return Value

Type: AFCompoundPartitioningRequestAFRangeTBin, TGroup
An aggregate request grouped by a compound key of two fields.

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