Metric report
Get multiple aggregated values grouped by common dimensions.
Use cases
Advanced reporting
Create reports with multiple metrics.
Custom reporting
Build reports with custom metrics.
Features
All the common API features, plus:
Example
Example 1: Simple metric report query
Get the total taco sales for the last 30 days, grouped by restaurant name and taco name, and count distinct orders.
Usage
Arguments
The fields for querying a Metric Report.
A Metric Report is a table whose columns include dimensions and Metric values, calculated over a given time range.
The time range for calculating the Metric Report.
The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.
You can set this to “America/Los_Angeles”, “Europe/Berlin”, or any other value in the IANA time zone database. Defaults to “UTC”.
One or many dimensions to group the Metric values by. Typically, dimensions in a report are what you want to compare and rank.
One or more Metrics to include in the Metric Report. These will be broken down by dimensions
.
The Query Filters to apply when building the Metric Report, in the form of SQL. These can be used to filter out rows.
The index of the column to order the Metric Report by. The index is 1-based and defaults to the first Metric column. In other words, by default, reports are ordered by the first Metric; however, you can order by the second Metric, third Metric, etc., by overriding the orderByColumn
input. You can also order by dimensions this way.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging forward.
The number of rows to be returned when paging forward. It can be a number between 1 and 1,000.
The cursor to use when paging backward.
Response
The Metric Report node object.
This type represents a single row of a report.
An ordered array of display names for your dimensions and Metrics, as defined in the report input. Use this to display your table’s header.
An ordered array of columns. Each column contains the dimension and Metric values for a single row, as defined in the report input. Use this to display a single row within your table.
Was this page helpful?