Definition and examples
A metric is the logic of what is being measured. It is used to store data according to one or a set of dimension lists. Metrics can be input or calculated using formulas based on other metrics and/or list properties.
quantity (dimensions: product, country, month)
amount (dimensions: account, BU, quarter)
% of growth (dimensions: product, month)
seasonality curves (dimensions: product, month)
unit cost (dimensions: product, year)
salary (dimensions: employee, year)
Create, edit and delete a metric
To create a metric, go to the "block" section in the navigation bar and click on "+New" button, then select "Metric". You can then name it, chose the data type and decide on which dimensions this metric will be based on. Below you can see an example of a metric named Product Price with two dimensions, Month and Product Type.
To edit your metric, open the Configuration panel, and at the very end you will see "Edit metric". Click on it and you will land on the settings of the metric, you can change its dimensions and data type.
⚠️ Note that if you change the data type, data will be erased.
To delete a metric, enter the metric then click on the Settings button on the top right corner. You can then go to the "Danger Zone" and delete the metric.
Note that if the metric is used in a table or another metric you will get an error after deletion.
Formulas in metric
Below the Grid/Graph option, you see the formula bar. It's where you can write you metric formula. To delete the formula result and make you you have cleared all layers of data, use the formula f = blank, press enter and then type a new formula or input data. Here you can find all the articles about formulas in Pigment.