Calculate the metric from the formula or expression We are developing a metric store and it will contain two type of metrics.