IndexByGroups function

Apply metrics to groups.