# Method: properties.calculatedMetrics.create

- [HTTP request](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.request_body)
- [Response body](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.response_body)
- [Authorization scopes](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#body.aspect)
- [Try it!](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create#try-it)

Creates a CalculatedMetric.

### HTTP request

`POST https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/calculatedMetrics`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Format: properties/{property_id} Example: properties/1234 |

### Query parameters

| Parameters ||
|---|---|
| `calculatedMetricId` | `string` Required. The ID to use for the calculated metric which will become the final component of the calculated metric's resource name. This value should be 1-80 characters and valid characters are /\[a-zA-Z0-9_\]/, no spaces allowed. calculatedMetricId must be unique between all calculated metrics under a property. The calculatedMetricId is used when referencing this calculated metric from external APIs, for example, "calcMetric:{calculatedMetricId}". |

### Request body

The request body contains an instance of `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#CalculatedMetric`.

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#CalculatedMetric`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/analytics.edit`