Skip to content

Commit

Permalink
Merge pull request #2305 from dbt-labs/belasobral93-patch-2
Browse files Browse the repository at this point in the history
Update metrics.md
  • Loading branch information
mirnawong1 authored Nov 2, 2022
2 parents 0dae3e2 + a210acf commit 300e29b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions website/docs/docs/build/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ You may find some pieces of functionality, like secondary calculations, complica
| Input | Example | Description | Required |
| ----------- | ----------- | ----------- | -----------|
| <VersionBlock firstVersion="1.2">metric_list</VersionBlock><VersionBlock lastVersion="1.1">metric_name</VersionBlock> | <VersionBlock firstVersion="1.2">`metric('some_metric)'`, <br />[`metric('some_metric)'`, <br />`metric('some_other_metric)'`]<br /></VersionBlock><VersionBlock lastVersion="1.1">`'metric_name'`<br /></VersionBlock> | <VersionBlock firstVersion="1.2">The metric(s) to be queried by the macro. If multiple metrics required, provide in list format.</VersionBlock><VersionBlock lastVersion="1.1">The name of the metric</VersionBlock> | Required |
| grain | `day`, `week`, <br />`month`, `quarter`, <br />`year`<br /> | The time grain that the metric will be aggregated to in the returned dataset | Required |
| dimensions | [`plan`,<br /> `country`] | The dimensions you want the metric to be aggregated by in the returned dataset | Optional |
| grain | `'day'`, `'week'`, <br />`'month'`, `'quarter'`, <br />`'year'`<br /> | The time grain that the metric will be aggregated to in the returned dataset | Required |
| dimensions | [`'plan'`,<br /> `'country'`] | The dimensions you want the metric to be aggregated by in the returned dataset | Optional |
| secondary_calculations | [`metrics.period_over_period( comparison_strategy="ratio", interval=1, alias="pop_1wk")`] | Performs the specified secondary calculation on the metric results. Examples include period over period calculations, rolling calcultions, and period to date calculations. | Optional |
| start_date | `2022-01-01` | Limits the date range of data used in the metric calculation by not querying data before this date | Optional |
| end_date | `2022-12-31` | Limits the date range of data used in the metric claculation by not querying data after this date | Optional |
| start_date | `'2022-01-01'` | Limits the date range of data used in the metric calculation by not querying data before this date | Optional |
| end_date | `'2022-12-31'` | Limits the date range of data used in the metric claculation by not querying data after this date | Optional |
| where | `plan='paying_customer'` | A sql statment, or series of sql statements, that alter the **final** CTE in the generated sql. Most often used to limit the data to specific values of dimensions provided | Optional |

#### Secondary Calculations
Expand Down

0 comments on commit 300e29b

Please sign in to comment.