Pivot tables have a built-in feature to group numbers into buckets at a given interval.
This numeric grouping is fully automatic.
Fields
The source data contains three fields: Name, Age, and Group.
The “by” is set to 10 years, but can be customized as needed.
The pivot table maintains age grouping when fields are added or reconfigured.