Custom metric for aggregation based visualizations

Have you looked at custom formulas in Lens?