PowerMetrics: Working with (and combining) semantic and metrics layer metrics

PowerMetrics is designed as a hybrid BI solution. Business users can visualize and analyze metrics that come from a semantic layer (for example, metrics that are imported from a dbt™ Semantic Layer project) and from the PowerMetrics metrics layer (for example, data that comes from cloud services, like Google Analytics and Facebook, or data that’s stored in spreadsheets). Your account doesn’t have to focus on one or the other metric type. It can combine both!

This article describes working with metrics imported from a dbt™ Semantic Layer project in combination with the metric types that are built into PowerMetrics and includes:

Combining metric types

One of the great things about PowerMetrics is its flexibility. For example, business users can combine their dbt Semantic Layer metrics with other metric types in multi-metric charts (in the Explorer and on a dashboard). Multi-metric charts enable them to visualize and compare data for multiple metrics in a single chart. For instance, they could add a dbt Semantic Layer “Revenue” metric to Explorer and analyze it alongside one or more of our many Facebook Ads instant metrics to see the impact of their Facebook Ads campaign. In Explorer, or in a multi-metric visualization on dashboard, up to 5 unique metrics can be combined for analysis and free-form exploration.

Business users can also combine dbt metrics with our built-in instant or custom metric types to create calculated metrics. Calculated metrics combine metric values using an equation (with simple math - addition, subtraction, multiplication, and division) to create a metric that can be expressed as a number, a percentage, or a ratio. With calculated metrics, dbt users can create the equivalent of a ratio or derived dbt metric. As a bonus, unlike dbt ratio and derived metrics, calculated metrics can be comprised of metrics from any data source.

In addition, any and all types of metrics can be added in visualizations to a dashboard.

The similarities

Metrics are metrics, after all. Here’s a list of PowerMetrics features that work the same way (with a couple minor exceptions) regardless of the metric type:

The differences

Because of fundamental differences in the way dbt Semantic Layer and PowerMetrics are designed, there’s bound to be some differences in working with metrics that come from each system. The table below summarizes these differences.

dbt Semantic Layer metrics

Metric types built into PowerMetrics

Metric types

Metric types are defined in the dbt Semantic Layer and include:

  • Simple
  • Ratio
  • Cumulative
  • Derived

Metric types

  • Instant metrics are created and managed by Klipfolio and give fast access to essential metrics for popular services.
  • Instant (calculated) metrics combine instant metrics (that are created and managed by Klipfolio) using calculations. For example, the Google Analytics 4 “Engagement Rate” instant metric combines two instant metrics using this formula: “Engaged Sessions” / “Sessions”.
  • Custom metrics are configured by you based on data feeds you create and manage. These metrics can connect to data from almost any data source you can think of.
  • Calculated metrics combine data from one or more instant, custom, or dbt metrics with a formula to create a single metric. Using calculated metrics, dbt users can create the equivalent of a ratio or derived dbt metric.

Connecting to a data source

Metrics are imported into PowerMetrics from dbt Semantic Layer projects.

Authorization is granted using your dbt Cloud Service token and Environment ID.

Learn more about adding dbt Semantic Layer metrics.

Connecting to a data source

Data feeds, either created by Klipfolio (for instant metrics) or by you (for custom metrics) connect to the data source and channel the data into your team’s metrics.

OAuth Token authentication is typically used to authorize PowerMetrics to access your data.

Learn more about data feeds and OAuth Token authentication in PowerMetrics.

How is data retrieved for metric visualizations?

To retrieve data for dbt metrics, PowerMetrics directly queries your data warehouse through the dbt Semantic Layer JDBC connection. We don’t store any of your data (except for a short-lived in-memory cache which can be manually (or automatically) cleared).

How is data retrieved for metric visualizations?

To retrieve data for instant and custom metrics, we send queries to our metrics database (where the data is stored).

To retrieve data for calculated metrics, we query the individual operands and apply the formula and calculation based on the query result. We don’t store data for the calculated metric itself, but, instead, for each metric within it. The only exception to this is if a calculated metric includes a dbt metric as we don’t store data for that metric type.

Data storage

Data is stored in the dbt user’s data warehouse, for example, Google BigQuery or Snowflake.

PowerMetrics does not store your data. When importing dbt metrics, PowerMetrics directly queries your data in real time from the dbt Semantic Layer project. This query is cached for a short time in memory and removed when the cache is cleared (either automatically with a webhook setup or manually).

Data storage

For instant and custom metrics, the data we retrieve from external data sources and APIs is stored in our proprietary metrics database, which is optimized for metric-based ingestion, updates, and queries.

Data update process

Data gets automatically updated in PowerMetrics, to align with the data in your dbt project, whenever a deployment job is successfully run (requires webhook setup). Users can also manually align data by clearing the cache for their connected dbt Semantic Layer account in PowerMetrics. Learn more.

Data update process

Data is queried automatically based on a schedule. Your pricing plan determines the auto-refresh rate but users can also manually queue a data feed to be refreshed. Learn more about data feed refresh.

Every time your data refreshes, the associated data feed gets updated. The resulting data is then added to the existing data for the metrics that use the feed. The metrics then incorporate the new data into their history.

Editing metrics

As mentioned above, data is stored in your chosen database. As a result, in PowerMetrics, users can edit a metric’s display properties but not its underlying data. Learn more about editing options for dbt Semantic Layer metrics.

Editing metrics

Editing options depend on the type of metric. For example, instant metrics, which are created and managed by Klipfolio, have fewer editing options than custom metrics that you create and manage yourself via data feeds. Learn more about editing options for instant, custom, and calculated metrics.

Related articles

Have more questions? Submit a request