- Inactive Users – The GA4 UI provides ‘Total Users’ and ‘Active Users’ metrics. We can create a calculated metric to find the value for inactive users without having to manually calculate this every time.
- Item Margin – Product margin aids in understanding the profitability of one or more products.
- Revenue after Refunds – Within GA4, we have the option to view refund data associated with transactions. We can take this analysis one step further and create a calculated metric to understand total revenue after any refunds have been issued.
Creating Calculated Metrics
There are two ways you can create calculated metrics with your GA4 data: via the GA4 UI or Looker Studio.GA4 User Interface
To create a calculated metric, navigate to the ‘Custom Definitions’ section in the Admin settings.![](https://infotrust.com/wp-content/uploads/2024/07/img-1-1.png)
In the Calculated Metrics tab, select ‘Create a Calculated Metric’.
![](https://infotrust.com/wp-content/uploads/2024/07/img-2-1-1024x400.png)
Type a name and description for the new metric. The API name will autopopulate with the name of the calculated metric in snake case format, although this API name can be edited if needed.
![](https://infotrust.com/wp-content/uploads/2024/07/img3-1024x885.png)
When clicking on the Formula field, a drop-down list will appear with all the metrics you can use to create a calculated metric with. Start typing out the name of a metric and select it from the list. Do this for any remaining metrics you would like to use within your formula, along with the appropriate operators.
Ensure that you select the correct unit of measurement for the calculated metric.
![](https://infotrust.com/wp-content/uploads/2024/07/img-4-1-1024x974.png)
Looker Studio Interface
An alternative to creating a calculated metric within the GA4 UI is by creating a ‘Calculated Field’ in Looker Studio. This approach is recommended for calculated metrics that require more complex formulas that the GA4 interface does not support. Important: Any calculated fields created within the Looker Studio interface are not visible within the GA4 UI. To begin creating a calculated field, click on ‘Add a Field’ > ‘Add a calculated field’ in the Data settings.![](https://infotrust.com/wp-content/uploads/2024/07/img-5-1-653x1024.png)
Give the new field a Field Name and begin typing out the formula within the Formula box.
![](https://infotrust.com/wp-content/uploads/2024/07/img-6-1-1024x254.png)
Once this is saved, you will be able to use this calculated field in your Looker Studio report.
Calculated Metrics (or Calculated Fields in Looker Studio) are a great way to further analyze your website data by using your existing metrics. To learn more about how custom metrics are useful, aside from using them to create calculated metrics, visit this article.