Add format method to a metric