Add measure aggregation function