Filtering grouped data and aggregates
Defines how filters interact with row grouping. Leaf rows are filtered first, then groups are rebuilt; empty groups are hidden; aggregates and counts reflect only filtered rows. Optionally, filters can target group-level aggregate values (a 'having'-style filter).
Planned. This page shows the specification from issue #188. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Sales grouped by Country, then City, with sum(Amount) and a row count. A Status set filter excludes Cancelled.
Expected behavior
Group sums and counts drop as rows are filtered. Groups whose rows are all filtered out disappear when hideEmptyGroups is on. The aggregate filter hides whole country groups whose filtered sum is below N. The count reads, for example, '12 of 40'.
Planned API surface
groupByaggregateOnFilteredRowshideEmptyGroupsgroupFilter (aggregate-level)groupRowCountMode ('filtered' | 'filteredOfTotal')Acceptance criteria
- Leaf filters are applied before grouping, and the group structure contains only groups that have matching leaves (when hideEmptyGroups=true). (pending)
- With aggregateOnFilteredRows=true, aggregates are computed only over filtered leaves. (pending)
- groupFilter is evaluated after aggregation and removes whole groups, including their subgroups. (pending)
- Group expansion state is preserved for groups that remain visible. (pending)
- The count text follows groupRowCountMode. (pending)