Metrics in MicroStrategy are the calculations performed on data. They are the derived columns which show results such as sum or average of some numeric values of a column in source data.
They are useful in creating custom calculations required by business. Creation of a metric involves using the in-built functions already available in MicroStrategy. The formula editor is used to create the formula for a metric.
In this example, we aim to find the average sales for each sub-category under every category from the sales data. This can be done by creating a metric which uses the Avg Function to find the average sales. The steps to create and use this metric is as follows.
Create a report with Category and sub-category as its two columns. Next, right click anywhere under the data source tab and near any of the measure fields. A pop-up appears which shows the create metric option.
In the Metric editor, write the formula for the average sales. Save the metric by giving it a name, say “AvgSales”.
Now, the metric AvgSales appears under the Dashboard Data as a measure. It can be dragged to the metric filed and then appears in the report.