AggregatesOpen
Add grouped totals, counts, averages, and min or max values to real grouped rows.
Add grouped totals, counts, averages, minimums, and maximums to a realistic transaction example.
The grid groups transaction records and exposes the aggregate values directly to grouped header and footer templates.
Use these guides when grouping needs to work together with the rest of the grid workflow.
sum for grouped transaction volumecount for grouped record countsavg for the average transaction sizemin for the smallest amount in the groupmax for the largest amount in the group aggregates: NgbDataGridAggregateDescriptor[] = [
{ field: 'amount', aggregate: 'sum' },
{ field: 'amount', aggregate: 'count' },
{ field: 'amount', aggregate: 'average' },
{ field: 'amount', aggregate: 'min' },
{ field: 'amount', aggregate: 'max' },
];
group: NgbDataGridGroupDescriptor[] = [
{ field: 'accountType', dir: 'asc', aggregates: this.aggregates },
{ field: 'status', dir: 'asc', aggregates: this.aggregates },
];
Loading interactive DataGrid example…
[
{
"field": "accountType",
"value": "Checking",
"dir": "asc",
"level": 0,
"count": 30,
"aggregates": {
"amount": {
"sum": 30664,
"count": 30,
"avg": 1022.1333333333333,
"average": 1022.1333333333333,
"min": 12,
"max": 5881
}
},
"items": [
{
"field": "status",
"value": "Cancelled",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 9293,
"count": 4,
"avg": 2323.25,
"average": 2323.25,
"min": 105,
"max": 5881
}
},
"items": [
{
"id": 700112,
"customer": "Harper Hall",
"accountNumber": "CHK-041204",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Cancelled",
"city": "Berlin",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 1744,
"postedAt": "2026-01-10"
},
{
"id": 700144,
"customer": "Harper Hall",
"accountNumber": "CHK-041748",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Cancelled",
"city": "Berlin",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 1563,
"postedAt": "2026-03-25"
},
{
"id": 700176,
"customer": "Harper Hall",
"accountNumber": "CHK-042292",
"accountType": "Checking",
"transactionType": "Interest",
"status": "Cancelled",
"city": "Berlin",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 105,
"postedAt": "2026-05-13"
},
{
"id": 700208,
"customer": "Harper Hall",
"accountNumber": "CHK-042836",
"accountType": "Checking",
"transactionType": "Transfer",
"status": "Cancelled",
"city": "Berlin",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 5881,
"postedAt": "2026-01-01"
}
]
},
{
"field": "status",
"value": "Completed",
"dir": "asc",
"level": 1,
"count": 19,
"aggregates": {
"amount": {
"sum": 14728,
"count": 19,
"avg": 775.1578947368421,
"average": 775.1578947368421,
"min": 21,
"max": 2659
}
},
"items": [
{
"id": 700100,
"customer": "Ava Thompson",
"accountNumber": "CHK-041000",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Completed",
"city": "Toronto",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 335,
"postedAt": "2026-01-01"
},
{
"id": 700108,
"customer": "Amelia Davis",
"accountNumber": "CHK-041136",
"accountType": "Checking",
"transactionType": "Interest",
"status": "Completed",
"city": "Amsterdam",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 309,
"postedAt": "2026-03-25"
},
{
"id": 700116,
"customer": "Abigail Torres",
"accountNumber": "CHK-041272",
"accountType": "Checking",
"transactionType": "Interest",
"status": "Completed",
"city": "Toronto",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 145,
"postedAt": "2026-05-22"
},
{
"id": 700120,
"customer": "Scarlett Campbell",
"accountNumber": "CHK-041340",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Completed",
"city": "Seoul",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 240,
"postedAt": "2026-03-07"
},
{
"id": 700124,
"customer": "Chloe Carter",
"accountNumber": "CHK-041408",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Completed",
"city": "Amsterdam",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 50,
"postedAt": "2026-01-19"
},
{
"id": 700132,
"customer": "Ava Thompson",
"accountNumber": "CHK-041544",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Completed",
"city": "Toronto",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 21,
"postedAt": "2026-03-16"
},
{
"id": 700140,
"customer": "Amelia Davis",
"accountNumber": "CHK-041680",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Completed",
"city": "Amsterdam",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 37,
"postedAt": "2026-05-13"
},
{
"id": 700148,
"customer": "Abigail Torres",
"accountNumber": "CHK-041816",
"accountType": "Checking",
"transactionType": "Transfer",
"status": "Completed",
"city": "Toronto",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 561,
"postedAt": "2026-01-10"
},
{
"id": 700152,
"customer": "Scarlett Campbell",
"accountNumber": "CHK-041884",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Completed",
"city": "Seoul",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 2659,
"postedAt": "2026-05-22"
},
{
"id": 700156,
"customer": "Chloe Carter",
"accountNumber": "CHK-041952",
"accountType": "Checking",
"transactionType": "Transfer",
"status": "Completed",
"city": "Amsterdam",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 1657,
"postedAt": "2026-03-07"
},
{
"id": 700164,
"customer": "Ava Thompson",
"accountNumber": "CHK-042088",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Completed",
"city": "Toronto",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 1068,
"postedAt": "2026-05-04"
},
{
"id": 700172,
"customer": "Amelia Davis",
"accountNumber": "CHK-042224",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Completed",
"city": "Amsterdam",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 864,
"postedAt": "2026-01-01"
},
{
"id": 700180,
"customer": "Abigail Torres",
"accountNumber": "CHK-042360",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Completed",
"city": "Toronto",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 1960,
"postedAt": "2026-03-25"
},
{
"id": 700184,
"customer": "Scarlett Campbell",
"accountNumber": "CHK-042428",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Completed",
"city": "Seoul",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 25,
"postedAt": "2026-01-10"
},
{
"id": 700188,
"customer": "Chloe Carter",
"accountNumber": "CHK-042496",
"accountType": "Checking",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Amsterdam",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 231,
"postedAt": "2026-05-22"
},
{
"id": 700196,
"customer": "Ava Thompson",
"accountNumber": "CHK-042632",
"accountType": "Checking",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Toronto",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 1327,
"postedAt": "2026-01-19"
},
{
"id": 700204,
"customer": "Amelia Davis",
"accountNumber": "CHK-042768",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Completed",
"city": "Amsterdam",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 683,
"postedAt": "2026-03-16"
},
{
"id": 700212,
"customer": "Abigail Torres",
"accountNumber": "CHK-042904",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Completed",
"city": "Toronto",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 1779,
"postedAt": "2026-05-13"
},
{
"id": 700216,
"customer": "Scarlett Campbell",
"accountNumber": "CHK-042972",
"accountType": "Checking",
"transactionType": "Transfer",
"status": "Completed",
"city": "Seoul",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 777,
"postedAt": "2026-03-25"
}
]
},
{
"field": "status",
"value": "Failed",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 1736,
"count": 4,
"avg": 434,
"average": 434,
"min": 12,
"max": 807
}
},
"items": [
{
"id": 700104,
"customer": "Sophia Kim",
"accountNumber": "CHK-041068",
"accountType": "Checking",
"transactionType": "Payment",
"status": "Failed",
"city": "Seoul",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 648,
"postedAt": "2026-05-13"
},
{
"id": 700136,
"customer": "Sophia Kim",
"accountNumber": "CHK-041612",
"accountType": "Checking",
"transactionType": "Withdrawal",
"status": "Failed",
"city": "Seoul",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 807,
"postedAt": "2026-01-01"
},
{
"id": 700168,
"customer": "Sophia Kim",
"accountNumber": "CHK-042156",
"accountType": "Checking",
"transactionType": "Interest",
"status": "Failed",
"city": "Seoul",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 269,
"postedAt": "2026-03-16"
},
{
"id": 700200,
"customer": "Sophia Kim",
"accountNumber": "CHK-042700",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Failed",
"city": "Seoul",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 12,
"postedAt": "2026-05-04"
}
]
},
{
"field": "status",
"value": "Pending",
"dir": "asc",
"level": 1,
"count": 3,
"aggregates": {
"amount": {
"sum": 4907,
"count": 3,
"avg": 1635.6666666666667,
"average": 1635.6666666666667,
"min": 41,
"max": 3755
}
},
"items": [
{
"id": 700128,
"customer": "Lily Parker",
"accountNumber": "CHK-041476",
"accountType": "Checking",
"transactionType": "Withdrawal",
"status": "Pending",
"city": "Berlin",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 1111,
"postedAt": "2026-05-04"
},
{
"id": 700160,
"customer": "Lily Parker",
"accountNumber": "CHK-042020",
"accountType": "Checking",
"transactionType": "Deposit",
"status": "Pending",
"city": "Berlin",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 3755,
"postedAt": "2026-01-19"
},
{
"id": 700192,
"customer": "Lily Parker",
"accountNumber": "CHK-042564",
"accountType": "Checking",
"transactionType": "Fee",
"status": "Pending",
"city": "Berlin",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 41,
"postedAt": "2026-03-07"
}
]
}
]
},
{
"field": "accountType",
"value": "Credit Card",
"dir": "asc",
"level": 0,
"count": 30,
"aggregates": {
"amount": {
"sum": 46825,
"count": 30,
"avg": 1560.8333333333333,
"average": 1560.8333333333333,
"min": 20,
"max": 4865
}
},
"items": [
{
"field": "status",
"value": "Cancelled",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 3756,
"count": 4,
"avg": 939,
"average": 939,
"min": 42,
"max": 2514
}
},
"items": [
{
"id": 700106,
"customer": "Isabella Nguyen",
"accountNumber": "CRD-041102",
"accountType": "Credit Card",
"transactionType": "Withdrawal",
"status": "Cancelled",
"city": "Tokyo",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 897,
"postedAt": "2026-01-19"
},
{
"id": 700138,
"customer": "Isabella Nguyen",
"accountNumber": "CRD-041646",
"accountType": "Credit Card",
"transactionType": "Interest",
"status": "Cancelled",
"city": "Tokyo",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 303,
"postedAt": "2026-03-07"
},
{
"id": 700170,
"customer": "Isabella Nguyen",
"accountNumber": "CRD-042190",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Cancelled",
"city": "Tokyo",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 42,
"postedAt": "2026-05-22"
},
{
"id": 700202,
"customer": "Isabella Nguyen",
"accountNumber": "CRD-042734",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Cancelled",
"city": "Tokyo",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 2514,
"postedAt": "2026-01-10"
}
]
},
{
"field": "status",
"value": "Completed",
"dir": "asc",
"level": 1,
"count": 19,
"aggregates": {
"amount": {
"sum": 29533,
"count": 19,
"avg": 1554.3684210526317,
"average": 1554.3684210526317,
"min": 22,
"max": 4167
}
},
"items": [
{
"id": 700102,
"customer": "Mia Johnson",
"accountNumber": "CRD-041034",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Completed",
"city": "Chicago",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 51,
"postedAt": "2026-03-07"
},
{
"id": 700110,
"customer": "Charlotte Lewis",
"accountNumber": "CRD-041170",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Completed",
"city": "New York",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 22,
"postedAt": "2026-05-04"
},
{
"id": 700114,
"customer": "Evelyn Young",
"accountNumber": "CRD-041238",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Completed",
"city": "Mumbai",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 2673,
"postedAt": "2026-03-16"
},
{
"id": 700118,
"customer": "Ella Baker",
"accountNumber": "CRD-041306",
"accountType": "Credit Card",
"transactionType": "Transfer",
"status": "Completed",
"city": "Chicago",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 3071,
"postedAt": "2026-01-01"
},
{
"id": 700126,
"customer": "Zoey Evans",
"accountNumber": "CRD-041442",
"accountType": "Credit Card",
"transactionType": "Transfer",
"status": "Completed",
"city": "New York",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 4167,
"postedAt": "2026-03-25"
},
{
"id": 700134,
"customer": "Mia Johnson",
"accountNumber": "CRD-041578",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Completed",
"city": "Chicago",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 2298,
"postedAt": "2026-05-22"
},
{
"id": 700142,
"customer": "Charlotte Lewis",
"accountNumber": "CRD-041714",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Completed",
"city": "New York",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 794,
"postedAt": "2026-01-19"
},
{
"id": 700146,
"customer": "Evelyn Young",
"accountNumber": "CRD-041782",
"accountType": "Credit Card",
"transactionType": "Interest",
"status": "Completed",
"city": "Mumbai",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 139,
"postedAt": "2026-05-04"
},
{
"id": 700150,
"customer": "Ella Baker",
"accountNumber": "CRD-041850",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Completed",
"city": "Chicago",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 1890,
"postedAt": "2026-03-16"
},
{
"id": 700158,
"customer": "Zoey Evans",
"accountNumber": "CRD-041986",
"accountType": "Credit Card",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "New York",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 1021,
"postedAt": "2026-05-13"
},
{
"id": 700166,
"customer": "Mia Johnson",
"accountNumber": "CRD-042122",
"accountType": "Credit Card",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Chicago",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 717,
"postedAt": "2026-01-10"
},
{
"id": 700174,
"customer": "Charlotte Lewis",
"accountNumber": "CRD-042258",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Completed",
"city": "New York",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 1793,
"postedAt": "2026-03-07"
},
{
"id": 700178,
"customer": "Evelyn Young",
"accountNumber": "CRD-042326",
"accountType": "Credit Card",
"transactionType": "Transfer",
"status": "Completed",
"city": "Mumbai",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 2191,
"postedAt": "2026-01-19"
},
{
"id": 700182,
"customer": "Ella Baker",
"accountNumber": "CRD-042394",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Completed",
"city": "Chicago",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 2889,
"postedAt": "2026-05-04"
},
{
"id": 700190,
"customer": "Zoey Evans",
"accountNumber": "CRD-042530",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Completed",
"city": "New York",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 3985,
"postedAt": "2026-01-01"
},
{
"id": 700198,
"customer": "Mia Johnson",
"accountNumber": "CRD-042666",
"accountType": "Credit Card",
"transactionType": "Interest",
"status": "Completed",
"city": "Chicago",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 263,
"postedAt": "2026-03-25"
},
{
"id": 700206,
"customer": "Charlotte Lewis",
"accountNumber": "CRD-042802",
"accountType": "Credit Card",
"transactionType": "Interest",
"status": "Completed",
"city": "New York",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 519,
"postedAt": "2026-05-22"
},
{
"id": 700210,
"customer": "Evelyn Young",
"accountNumber": "CRD-042870",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Completed",
"city": "Mumbai",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 1010,
"postedAt": "2026-03-07"
},
{
"id": 700214,
"customer": "Ella Baker",
"accountNumber": "CRD-042938",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Completed",
"city": "Chicago",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 40,
"postedAt": "2026-01-19"
}
]
},
{
"field": "status",
"value": "Failed",
"dir": "asc",
"level": 1,
"count": 3,
"aggregates": {
"amount": {
"sum": 6319,
"count": 3,
"avg": 2106.3333333333335,
"average": 2106.3333333333335,
"min": 36,
"max": 4865
}
},
"items": [
{
"id": 700130,
"customer": "Hannah Edwards",
"accountNumber": "CRD-041510",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Failed",
"city": "Mumbai",
"category": "Shopping",
"relationshipManager": "Jon Vega",
"amount": 4865,
"postedAt": "2026-01-10"
},
{
"id": 700162,
"customer": "Hannah Edwards",
"accountNumber": "CRD-042054",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Failed",
"city": "Mumbai",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 36,
"postedAt": "2026-03-25"
},
{
"id": 700194,
"customer": "Hannah Edwards",
"accountNumber": "CRD-042598",
"accountType": "Credit Card",
"transactionType": "Payment",
"status": "Failed",
"city": "Mumbai",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 1418,
"postedAt": "2026-05-13"
}
]
},
{
"field": "status",
"value": "Pending",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 7217,
"count": 4,
"avg": 1804.25,
"average": 1804.25,
"min": 20,
"max": 3769
}
},
"items": [
{
"id": 700122,
"customer": "Grace Perez",
"accountNumber": "CRD-041374",
"accountType": "Credit Card",
"transactionType": "Deposit",
"status": "Pending",
"city": "Tokyo",
"category": "Dining",
"relationshipManager": "Maya Chen",
"amount": 3769,
"postedAt": "2026-05-13"
},
{
"id": 700154,
"customer": "Grace Perez",
"accountNumber": "CRD-041918",
"accountType": "Credit Card",
"transactionType": "Fee",
"status": "Pending",
"city": "Tokyo",
"category": "Investment",
"relationshipManager": "Omar Hassan",
"amount": 20,
"postedAt": "2026-01-01"
},
{
"id": 700186,
"customer": "Grace Perez",
"accountNumber": "CRD-042462",
"accountType": "Credit Card",
"transactionType": "Transfer",
"status": "Pending",
"city": "Tokyo",
"category": "Travel",
"relationshipManager": "Nina Brooks",
"amount": 3287,
"postedAt": "2026-03-16"
},
{
"id": 700218,
"customer": "Grace Perez",
"accountNumber": "CRD-043006",
"accountType": "Credit Card",
"transactionType": "Withdrawal",
"status": "Pending",
"city": "Tokyo",
"category": "Insurance",
"relationshipManager": "Ari Patel",
"amount": 141,
"postedAt": "2026-05-04"
}
]
}
]
},
{
"field": "accountType",
"value": "Investment",
"dir": "asc",
"level": 0,
"count": 30,
"aggregates": {
"amount": {
"sum": 56333,
"count": 30,
"avg": 1877.7666666666667,
"average": 1877.7666666666667,
"min": 14,
"max": 6366
}
},
"items": [
{
"field": "status",
"value": "Cancelled",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 6416,
"count": 4,
"avg": 1604,
"average": 1604,
"min": 338,
"max": 2946
}
},
"items": [
{
"id": 700103,
"customer": "Liam Patel",
"accountNumber": "INV-041051",
"accountType": "Investment",
"transactionType": "Deposit",
"status": "Cancelled",
"city": "Madrid",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 2946,
"postedAt": "2026-04-10"
},
{
"id": 700135,
"customer": "Liam Patel",
"accountNumber": "INV-041595",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Cancelled",
"city": "Madrid",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 668,
"postedAt": "2026-06-25"
},
{
"id": 700167,
"customer": "Liam Patel",
"accountNumber": "INV-042139",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Cancelled",
"city": "Madrid",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 2464,
"postedAt": "2026-02-13"
},
{
"id": 700199,
"customer": "Liam Patel",
"accountNumber": "INV-042683",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Cancelled",
"city": "Madrid",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 338,
"postedAt": "2026-04-01"
}
]
},
{
"field": "status",
"value": "Completed",
"dir": "asc",
"level": 1,
"count": 19,
"aggregates": {
"amount": {
"sum": 38393,
"count": 19,
"avg": 2020.6842105263158,
"average": 2020.6842105263158,
"min": 18,
"max": 6366
}
},
"items": [
{
"id": 700107,
"customer": "Lucas Brown",
"accountNumber": "INV-041119",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Completed",
"city": "Sydney",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 3344,
"postedAt": "2026-02-22"
},
{
"id": 700111,
"customer": "Elijah Walker",
"accountNumber": "INV-041187",
"accountType": "Investment",
"transactionType": "Deposit",
"status": "Completed",
"city": "Paris",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 4042,
"postedAt": "2026-06-07"
},
{
"id": 700115,
"customer": "Benjamin Scott",
"accountNumber": "INV-041255",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Completed",
"city": "Johannesburg",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 4440,
"postedAt": "2026-04-19"
},
{
"id": 700123,
"customer": "Michael Roberts",
"accountNumber": "INV-041391",
"accountType": "Investment",
"transactionType": "Payment",
"status": "Completed",
"city": "Sydney",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 1384,
"postedAt": "2026-06-16"
},
{
"id": 700131,
"customer": "Levi Stewart",
"accountNumber": "INV-041527",
"accountType": "Investment",
"transactionType": "Payment",
"status": "Completed",
"city": "Johannesburg",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 2480,
"postedAt": "2026-02-13"
},
{
"id": 700139,
"customer": "Lucas Brown",
"accountNumber": "INV-041663",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Sydney",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 1218,
"postedAt": "2026-04-10"
},
{
"id": 700143,
"customer": "Elijah Walker",
"accountNumber": "INV-041731",
"accountType": "Investment",
"transactionType": "Fee",
"status": "Completed",
"city": "Paris",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 43,
"postedAt": "2026-02-22"
},
{
"id": 700147,
"customer": "Benjamin Scott",
"accountNumber": "INV-041799",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Johannesburg",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 914,
"postedAt": "2026-06-07"
},
{
"id": 700155,
"customer": "Michael Roberts",
"accountNumber": "INV-041935",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Sydney",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 610,
"postedAt": "2026-02-04"
},
{
"id": 700163,
"customer": "Levi Stewart",
"accountNumber": "INV-042071",
"accountType": "Investment",
"transactionType": "Deposit",
"status": "Completed",
"city": "Johannesburg",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 6366,
"postedAt": "2026-04-01"
},
{
"id": 700171,
"customer": "Lucas Brown",
"accountNumber": "INV-042207",
"accountType": "Investment",
"transactionType": "Deposit",
"status": "Completed",
"city": "Sydney",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 3162,
"postedAt": "2026-06-25"
},
{
"id": 700175,
"customer": "Elijah Walker",
"accountNumber": "INV-042275",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Completed",
"city": "Paris",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 3560,
"postedAt": "2026-04-10"
},
{
"id": 700179,
"customer": "Benjamin Scott",
"accountNumber": "INV-042343",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Completed",
"city": "Johannesburg",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 536,
"postedAt": "2026-02-22"
},
{
"id": 700187,
"customer": "Michael Roberts",
"accountNumber": "INV-042479",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Completed",
"city": "Sydney",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 792,
"postedAt": "2026-04-19"
},
{
"id": 700195,
"customer": "Levi Stewart",
"accountNumber": "INV-042615",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Completed",
"city": "Johannesburg",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 628,
"postedAt": "2026-06-16"
},
{
"id": 700203,
"customer": "Lucas Brown",
"accountNumber": "INV-042751",
"accountType": "Investment",
"transactionType": "Fee",
"status": "Completed",
"city": "Sydney",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 18,
"postedAt": "2026-02-13"
},
{
"id": 700207,
"customer": "Elijah Walker",
"accountNumber": "INV-042819",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Paris",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 1434,
"postedAt": "2026-06-25"
},
{
"id": 700211,
"customer": "Benjamin Scott",
"accountNumber": "INV-042887",
"accountType": "Investment",
"transactionType": "Fee",
"status": "Completed",
"city": "Johannesburg",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 34,
"postedAt": "2026-04-10"
},
{
"id": 700219,
"customer": "Michael Roberts",
"accountNumber": "INV-043023",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Completed",
"city": "Sydney",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 3388,
"postedAt": "2026-06-07"
}
]
},
{
"field": "status",
"value": "Failed",
"dir": "asc",
"level": 1,
"count": 3,
"aggregates": {
"amount": {
"sum": 6700,
"count": 3,
"avg": 2233.3333333333335,
"average": 2233.3333333333335,
"min": 832,
"max": 4268
}
},
"items": [
{
"id": 700127,
"customer": "Jack Turner",
"accountNumber": "INV-041459",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Failed",
"city": "Paris",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 832,
"postedAt": "2026-04-01"
},
{
"id": 700159,
"customer": "Jack Turner",
"accountNumber": "INV-042003",
"accountType": "Investment",
"transactionType": "Transfer",
"status": "Failed",
"city": "Paris",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 4268,
"postedAt": "2026-06-16"
},
{
"id": 700191,
"customer": "Jack Turner",
"accountNumber": "INV-042547",
"accountType": "Investment",
"transactionType": "Payment",
"status": "Failed",
"city": "Paris",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 1600,
"postedAt": "2026-02-04"
}
]
},
{
"field": "status",
"value": "Pending",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 4824,
"count": 4,
"avg": 1206,
"average": 1206,
"min": 14,
"max": 3104
}
},
"items": [
{
"id": 700119,
"customer": "Alexander Green",
"accountNumber": "INV-041323",
"accountType": "Investment",
"transactionType": "Interest",
"status": "Pending",
"city": "Madrid",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 576,
"postedAt": "2026-02-04"
},
{
"id": 700151,
"customer": "Alexander Green",
"accountNumber": "INV-041867",
"accountType": "Investment",
"transactionType": "Fee",
"status": "Pending",
"city": "Madrid",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 14,
"postedAt": "2026-04-19"
},
{
"id": 700183,
"customer": "Alexander Green",
"accountNumber": "INV-042411",
"accountType": "Investment",
"transactionType": "Payment",
"status": "Pending",
"city": "Madrid",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 3104,
"postedAt": "2026-06-07"
},
{
"id": 700215,
"customer": "Alexander Green",
"accountNumber": "INV-042955",
"accountType": "Investment",
"transactionType": "Withdrawal",
"status": "Pending",
"city": "Madrid",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 1130,
"postedAt": "2026-02-22"
}
]
}
]
},
{
"field": "accountType",
"value": "Savings",
"dir": "asc",
"level": 0,
"count": 30,
"aggregates": {
"amount": {
"sum": 50747,
"count": 30,
"avg": 1691.5666666666666,
"average": 1691.5666666666666,
"min": 19,
"max": 5650
}
},
"items": [
{
"field": "status",
"value": "Cancelled",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 8338,
"count": 4,
"avg": 2084.5,
"average": 2084.5,
"min": 48,
"max": 5650
}
},
"items": [
{
"id": 700109,
"customer": "Mason Clark",
"accountNumber": "SVG-041153",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Cancelled",
"city": "Sao Paulo",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 1308,
"postedAt": "2026-04-01"
},
{
"id": 700141,
"customer": "Mason Clark",
"accountNumber": "SVG-041697",
"accountType": "Savings",
"transactionType": "Deposit",
"status": "Cancelled",
"city": "Sao Paulo",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 1332,
"postedAt": "2026-06-16"
},
{
"id": 700173,
"customer": "Mason Clark",
"accountNumber": "SVG-042241",
"accountType": "Savings",
"transactionType": "Fee",
"status": "Cancelled",
"city": "Sao Paulo",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 48,
"postedAt": "2026-02-04"
},
{
"id": 700205,
"customer": "Mason Clark",
"accountNumber": "SVG-042785",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Cancelled",
"city": "Sao Paulo",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 5650,
"postedAt": "2026-04-19"
}
]
},
{
"field": "status",
"value": "Completed",
"dir": "asc",
"level": 1,
"count": 19,
"aggregates": {
"amount": {
"sum": 27852,
"count": 19,
"avg": 1465.8947368421052,
"average": 1465.8947368421052,
"min": 19,
"max": 5434
}
},
"items": [
{
"id": 700105,
"customer": "Ethan Rivera",
"accountNumber": "SVG-041085",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Completed",
"city": "London",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 354,
"postedAt": "2026-06-16"
},
{
"id": 700113,
"customer": "James Allen",
"accountNumber": "SVG-041221",
"accountType": "Savings",
"transactionType": "Fee",
"status": "Completed",
"city": "Dubai",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 28,
"postedAt": "2026-02-13"
},
{
"id": 700117,
"customer": "Henry Adams",
"accountNumber": "SVG-041289",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Singapore",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 1004,
"postedAt": "2026-06-25"
},
{
"id": 700121,
"customer": "Daniel Mitchell",
"accountNumber": "SVG-041357",
"accountType": "Savings",
"transactionType": "Fee",
"status": "Completed",
"city": "London",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 44,
"postedAt": "2026-04-10"
},
{
"id": 700129,
"customer": "Owen Collins",
"accountNumber": "SVG-041493",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Completed",
"city": "Dubai",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 4338,
"postedAt": "2026-06-07"
},
{
"id": 700137,
"customer": "Ethan Rivera",
"accountNumber": "SVG-041629",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Completed",
"city": "London",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 5434,
"postedAt": "2026-02-04"
},
{
"id": 700145,
"customer": "James Allen",
"accountNumber": "SVG-041765",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Completed",
"city": "Dubai",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 330,
"postedAt": "2026-04-01"
},
{
"id": 700149,
"customer": "Henry Adams",
"accountNumber": "SVG-041833",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Completed",
"city": "Singapore",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 82,
"postedAt": "2026-02-13"
},
{
"id": 700153,
"customer": "Daniel Mitchell",
"accountNumber": "SVG-041901",
"accountType": "Savings",
"transactionType": "Payment",
"status": "Completed",
"city": "London",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 2221,
"postedAt": "2026-06-25"
},
{
"id": 700161,
"customer": "Owen Collins",
"accountNumber": "SVG-042037",
"accountType": "Savings",
"transactionType": "Payment",
"status": "Completed",
"city": "Dubai",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 717,
"postedAt": "2026-02-22"
},
{
"id": 700169,
"customer": "Ethan Rivera",
"accountNumber": "SVG-042173",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "London",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 428,
"postedAt": "2026-04-19"
},
{
"id": 700177,
"customer": "James Allen",
"accountNumber": "SVG-042309",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "Dubai",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 124,
"postedAt": "2026-06-16"
},
{
"id": 700181,
"customer": "Henry Adams",
"accountNumber": "SVG-042377",
"accountType": "Savings",
"transactionType": "Fee",
"status": "Completed",
"city": "Singapore",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 19,
"postedAt": "2026-04-01"
},
{
"id": 700185,
"customer": "Daniel Mitchell",
"accountNumber": "SVG-042445",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Completed",
"city": "London",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 1220,
"postedAt": "2026-02-13"
},
{
"id": 700193,
"customer": "Owen Collins",
"accountNumber": "SVG-042581",
"accountType": "Savings",
"transactionType": "Deposit",
"status": "Completed",
"city": "Dubai",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 4156,
"postedAt": "2026-04-10"
},
{
"id": 700201,
"customer": "Ethan Rivera",
"accountNumber": "SVG-042717",
"accountType": "Savings",
"transactionType": "Deposit",
"status": "Completed",
"city": "London",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 5252,
"postedAt": "2026-06-07"
},
{
"id": 700209,
"customer": "James Allen",
"accountNumber": "SVG-042853",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Completed",
"city": "Dubai",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 462,
"postedAt": "2026-02-04"
},
{
"id": 700213,
"customer": "Henry Adams",
"accountNumber": "SVG-042921",
"accountType": "Savings",
"transactionType": "Payment",
"status": "Completed",
"city": "Singapore",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 1341,
"postedAt": "2026-06-16"
},
{
"id": 700217,
"customer": "Daniel Mitchell",
"accountNumber": "SVG-042989",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Completed",
"city": "London",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 298,
"postedAt": "2026-04-01"
}
]
},
{
"field": "status",
"value": "Failed",
"dir": "asc",
"level": 1,
"count": 4,
"aggregates": {
"amount": {
"sum": 10061,
"count": 4,
"avg": 2515.25,
"average": 2515.25,
"min": 174,
"max": 5036
}
},
"items": [
{
"id": 700101,
"customer": "Noah Martinez",
"accountNumber": "SVG-041017",
"accountType": "Savings",
"transactionType": "Payment",
"status": "Failed",
"city": "Singapore",
"category": "Mortgage",
"relationshipManager": "Nina Brooks",
"amount": 297,
"postedAt": "2026-02-04"
},
{
"id": 700133,
"customer": "Noah Martinez",
"accountNumber": "SVG-041561",
"accountType": "Savings",
"transactionType": "Deposit",
"status": "Failed",
"city": "Singapore",
"category": "Utilities",
"relationshipManager": "Ari Patel",
"amount": 5036,
"postedAt": "2026-04-19"
},
{
"id": 700165,
"customer": "Noah Martinez",
"accountNumber": "SVG-042105",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Failed",
"city": "Singapore",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 174,
"postedAt": "2026-06-07"
},
{
"id": 700197,
"customer": "Noah Martinez",
"accountNumber": "SVG-042649",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Failed",
"city": "Singapore",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 4554,
"postedAt": "2026-02-22"
}
]
},
{
"field": "status",
"value": "Pending",
"dir": "asc",
"level": 1,
"count": 3,
"aggregates": {
"amount": {
"sum": 4496,
"count": 3,
"avg": 1498.6666666666667,
"average": 1498.6666666666667,
"min": 338,
"max": 3458
}
},
"items": [
{
"id": 700125,
"customer": "Sebastian Phillips",
"accountNumber": "SVG-041425",
"accountType": "Savings",
"transactionType": "Withdrawal",
"status": "Pending",
"city": "Sao Paulo",
"category": "Tuition",
"relationshipManager": "Jon Vega",
"amount": 700,
"postedAt": "2026-02-22"
},
{
"id": 700157,
"customer": "Sebastian Phillips",
"accountNumber": "SVG-041969",
"accountType": "Savings",
"transactionType": "Interest",
"status": "Pending",
"city": "Sao Paulo",
"category": "Salary",
"relationshipManager": "Maya Chen",
"amount": 338,
"postedAt": "2026-04-10"
},
{
"id": 700189,
"customer": "Sebastian Phillips",
"accountNumber": "SVG-042513",
"accountType": "Savings",
"transactionType": "Transfer",
"status": "Pending",
"city": "Sao Paulo",
"category": "Healthcare",
"relationshipManager": "Omar Hassan",
"amount": 3458,
"postedAt": "2026-06-25"
}
]
}
]
}
]When the app owns grouping state, reapply the aggregate descriptors to the next descriptor list before saving it back into component state or sending it to a backend.
onGroupChange(group: NgbDataGridGroupDescriptor[]) {
this.group = group.map((descriptor) => ({
...descriptor,
aggregates: this.aggregates,
}));
}
loadPage(state: NgbDataGridState) {
const result = this.api.query({
...state,
group: this.group,
});
this.rows = result.data;
this.groupedData = result.groupedData;
this.total = result.total;
}
| API | Type | Usage |
|---|---|---|
NgbDataGridAggregateDescriptor | interface | Declares the aggregate field plus aggregate type for grouped and full-result calculations. |
NgbDataGridAggregateType | type | Supported aggregate names: `sum`, `count`, `avg`/`average`, `min`, and `max`. |
NgbDataGridGroupDescriptor.aggregates | NgbDataGridAggregateDescriptor[] | Optional per-group aggregate descriptor list. |
[groupedData] | NgbDataGridGroupResult<T>[] | null | Optional processed grouped result input for manual or server-owned grouping flows. |
[groupedData], but the app is still responsible for building that payload.Move between the overview, templates, aggregates, and sticky grouped row guides without losing context.
Start with local and manual grouping, shared state, and the base grouped grid flow.
Customize grouped headers, grouped cells, and grouped footer rows with public directives.
Add grouped totals, counts, averages, and min or max values to real grouped rows.
Keep grouped context pinned while scrolling through large grouped result sets.