query_metrics
Compute business metrics and break them down by up to 3 dimensions with filters, date ranges, sorting, and share-of-total figures.
Instructions
Compute metrics, optionally split by dimensions.
Args:
metrics: metric names from list_metrics, e.g. ["gross_revenue", "orders"].
dimensions: up to 3 dimension names, e.g. ["country"] or ["month"].
filters: dimension -> allowed values, e.g. {"country": ["France", "Germany"]}.
date_from / date_to: inclusive ISO dates (YYYY-MM-DD) on the invoice date.
order_by: a requested metric or dimension. Defaults to the first metric.
descending: sort direction.
limit: max rows (1-1000).
with_share: add <metric>_share = share of the total across the returned groups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| date_to | No | ||
| filters | No | ||
| metrics | Yes | ||
| order_by | No | ||
| date_from | No | ||
| descending | No | ||
| dimensions | No | ||
| with_share | No |