> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Invalid aggregation

The aggregation you requested isn't allowed for this measure field.

---

## Example

```json
{
  "error": {
    "type": "request_error",
    "code": "invalid_aggregation",
    "detail": "The aggregation 'sum' is not allowed for field 'gross_revenue'.",
    "documentation_url": "https://developer.paddle.com/errors/metrics/invalid_aggregation"
  },
  "meta": {
    "request_id": "00000000-0000-0000-0000-000000000000"
  }
}
```

## Details

| Attribute | Value |
| --- | --- |
| Status code | 400 |
| Error code | `invalid_aggregation` |
| Error message | The aggregation '%s' is not allowed for field '%s'. |

## Common causes

- The `agg` for a measure isn't one of the aggregations allowed for that field.

## Common solutions

- Check the aggregations listed against this measure by [list Explore metric entities](https://developer.paddle.com/api-reference/metrics/list-explore-metric-entities) and use one of those.
