Key concepts

  • Metric type: Defines how the data is aggregated.
  • Data Pool: The source of the data for the Metric.
  • Dimensions: A set of columns used to categorize and segment the Metric data.
  • Filters: A set of filters that define a subset of the Data Pool records to include in the Metric calculations.

Defining a Metric

This example shows how to create a Sum Metric to define a “Revenue” metric by summing the “total_price” column in the TacoSoft sample dataset.A screen capture demonstrating how to define a Metric.

Examples

Example 1: Metrics with filters

This example shows how to create a Sum Metric with filters to define an “Al Pastor Revenue” metric by summing the “total_price” column for Al Pastor tacos in the TacoSoft sample dataset.
A screen capture demonstrating how to define a Metric with filters.

Example 2: Metrics with JSON fields

You can use JSON values in the metric definition, either as a measure or as filters. This example shows how to create a Sum Metric using a measure from a JSON column.
A screen capture demonstrating how to define a Metric with a JSON colum.

Example 3: Custom Metrics

Custom Metrics use SQL expressions to aggregate data from your Data Pool, enabling more complex business logic. This example shows how to create a Custom Metric for “Average revenue per order”.
A screen capture demonstrating how to define a Custom Metric.