GroupBy
A GroupBy defines the group-key fields and the list of aggregations to compute for each group. It is the required member of every Summary.
Properties
| Property | Type | Description |
|---|---|---|
Fields | List<string> | Properties to group by (must be simple types — no collections, no complex types). |
AggregateBy | List<AggregateBy> | Aggregations to compute per group. |
Field restrictions
Group keys must be simple value types —
string, numbers, booleans, enums, dates, etc. Collections and complex/navigation types cannot be grouped on.C# example
var groupBy = new GroupBy
{
Fields = new List<string> { "Country", "Status" },
AggregateBy = new List<AggregateBy>
{
new AggregateBy { Aggregator = Aggregator.Count, Alias = "Total" },
new AggregateBy { Field = "Amount", Aggregator = Aggregator.Sum, Alias = "Revenue" }
}
};JSON example
{
"fields": ["Country", "Status"],
"aggregateBy": [
{ "aggregator": "Count", "alias": "Total" },
{ "field": "Amount", "aggregator": "Sum", "alias": "Revenue" }
]
}