What's the difference between metrics and fact tables?
11/22/2023, 4:37 PM
Hi Aaron 👋
Metrics in GrowthBook are the key performance indicators that your experiments are trying to improve or at least not harm.
They can be defined in various ways, including using Fact Tables, and they can have different units and statistical distributions such as binomial, count, duration, and revenue.
Each of these metric types uses some form of aggregation, often defaulting to `SUM`, per user and then takes an average with respect to the total number of users (source).
Fact Tables, on the other hand, are a new feature in GrowthBook that allows you to write SQL once for an event and from that, you can create multiple related metrics.
Fact Tables are designed to simplify the process of defining metrics by allowing you to have one complex SQL definition that can be reused across many related metrics.
They also support a few pre-defined aggregations like `COUNT` and `SUM` (source).
Metrics are the end goals you are measuring in your experiments, while Fact Tables are a structured way to define and source the data that makes up those metrics.