Skip to content

Commit

Permalink
Update metrics-overview.md (#3778)
Browse files Browse the repository at this point in the history
adding timespine info
  • Loading branch information
mirnawong1 authored Jul 19, 2023
2 parents 9ba3d41 + 0ad9b02 commit 34e7fdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions website/docs/docs/build/cumulative-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ tags: [Metrics, Semantic Layer]

Cumulative metrics aggregate a measure over a given window. If no window is specified, the window is considered infinite and accumulates values over all time.

:::info MetricFlow time spine required

You will need to create the [time spine model](/docs/build/metricflow-time-spine) before you add cumulative metrics.

:::

```yaml
# Cumulative metrics aggregate a measure over a given window. The window is considered infinite if no window parameter is passed (accumulate the measure over all time)
metrics:
Expand All @@ -24,7 +30,7 @@ metrics:
### Window options
This section details examples for when you specify and don't specify window options.
This section details examples of when you specify and don't specify window options.
<Tabs>
Expand Down Expand Up @@ -56,7 +62,7 @@ metrics:
window: 7 days
```

From the sample yaml above, note the following:
From the sample YAML above, note the following:

* `type`: Specify cumulative to indicate the type of metric.
* `type_params`: Specify the measure you want to aggregate as a cumulative metric. You have the option of specifying a `window`, or a `grain to date`.
Expand Down Expand Up @@ -142,7 +148,7 @@ metrics:
```yaml
metrics:
name: revenue_monthly_grain_to_date #For this metric, we use a monthly grain to date
description: Monthly revenue using a grain to date of 1 month (think of this as a monthly resetting point)
description: Monthly revenue using grain to date of 1 month (think of this as a monthly resetting point)
type: cumulative
type_params:
measures:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/build/metrics-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This page explains the different supported metric types you can add to your dbt

### Cumulative metrics

[Cumulative metrics](/docs/build/cumulative) aggregate a measure over a given window. Note that if no window is specified, the window would accumulate the measure over all time.
[Cumulative metrics](/docs/build/cumulative) aggregate a measure over a given window. If no window is specified, the window would accumulate the measure over all time. **Note**m, you will need to create the [time spine model](/docs/build/metricflow-time-spine) before you add cumulative metrics.

```yaml
# Cumulative metrics aggregate a measure over a given window. The window is considered infinite if no window parameter is passed (accumulate the measure over all time)
Expand Down

0 comments on commit 34e7fdf

Please sign in to comment.