Skip to main content

Metrics

A Metric is a business indicator measured over time. In Propel, Metrics represents the definition of that business indicator, the data that powers it, and the API to consume its data.

Metrics enable you to build product experiences like dashboards, leaderboards, key performance indicators, or analytics APIs. With Metrics, you can define metrics once and use their data throughout your web or mobile applications via Propel's API.

Metric Query API

You can query Metrics in different ways depending on the experience you are looking to build.

Counter metric example cardCounter metric example card

Counter

This is the simplest Metric Query API, it returns a single value summarizing the Metric over the requested time range.

Time Series metric example cardTime Series metric example card

Time Series

The time series Metric Query API returns data to visualize as a time series bar or line chart over the requested time range.

Leaderboard metric example cardLeaderboard metric example card

Leaderboard

The leaderboard Metric Query API is useful for building rankings or ‚top N‚ visualizations over one or more Dimensions over the requested time range.

The Metric definition

A Metric is powered by a Data Pool and is defined by its type, its Metric Filters, and an optional set of Dimensions that can be filtered at query time. You can define Metrics via the Console or API.

An animated screen capture of how to define a Metric.

Data Pool

The Data Pool provides the data for the Metric. It ensures that the Metric has the data they need and that it is served blazingly fast so you can power responsive, interactive product experiences.

The Data Pool's' primary timestamp column acts a the the Metric's time dimension.

Type

Each Metric type performs a different data aggregation. Below is a list of all the available Metric types:

TypeDescriptionExample
SumSums the values of the specified column for every record that matches the Metric Filters. It will sum the values for each time granularity for time series queries.Revenue
CountCounts the number of records that matches the Metric Filters. It will count the values for each time granularity for time series queries.Page views
Count DistinctCounts the number of distinct values in the specified column for every record that matches the Metric Filters. It will count the distinct values for each time granularity for time series queries.Unique visitors
MaxSelects the maximum value of the specified column for every record that matches the Metric Filters. It will select the maximum value for each time granularity for time series queries.Maximum speed
MinSelects the minimum value of the specified column for every record that matches the Metric Filters. It will select the minimum value for each time granularity for time series queries.Minimum temperature
AverageAverages the values of the specified column for every record that matches the Metric Filters. It will average the values for each time granularity for time series queries.Average call handle time

Dimensions

Dimensions are qualitative values used to categorize and segment the Metric data. For example, if you have a revenue metric and want to see revenue by country, product, or salesperson, then country, product, and salesperson would be Dimensions in the revenue Metric definition.

Do not expose as Dimensions columns that are internal and not meant to be used in customer-facing applications.

Metric Filters

Metric Filters enable you to define a Metric with a subset of records from the given Data Pool. If no Filters are present, Propel will include all the Data Pool records in the Metric calculations.

Suppose you need to define a revenue Metric that does not include promotional (PROMO) transactions. In that case, you can create a Metric Filter and exclude transactions with type "PROMO" in the Metric definition instead of remembering to filter them every time you query the revenue Metric.