Skip to content

Commit 0b26ef4

Browse files
authored
Update semantic-layer-6-advanced-metrics.md (#4789)
## What are you changing in this pull request and why? Fix indent and incorrect filter and measure in `Ratio metrics` which are causing errors in implementing the code: ```sql - name: food_revenue description: The revenue from food in each order. label: Food Revenue type: simple type_params: measure: revenue filter: | {{ Dimension('order__is_food_order') }} = true ``` to ``` - name: food_revenue description: The revenue from food in each order. label: Food Revenue type: simple type_params: measure: food_revenue ``` ## Checklist <!-- Uncomment when publishing docs for a prerelease version of dbt: - [ ] Add versioning components, as described in [Versioning Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages) - [ ] Add a note to the prerelease version [Migration Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade) --> - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [ ] For [docs versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning), review how to [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content). - [x] Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."
2 parents 7fbd066 + 944f238 commit 0b26ef4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

website/docs/best-practices/how-we-build-our-metrics/semantic-layer-6-advanced-metrics.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ We're not limited to just passing measures through to our metrics, we can also _
2121

2222
```YAML
2323
- name: food_revenue
24-
description: The revenue from food in each order.
25-
label: Food Revenue
26-
type: simple
27-
type_params:
28-
measure: revenue
29-
filter: |
30-
{{ Dimension('order__is_food_order') }} = true
24+
description: The revenue from food in each order.
25+
label: Food Revenue
26+
type: simple
27+
type_params:
28+
measure: food_revenue
3129
```
3230
3331
- 📝 Now we can set up our ratio metric.

0 commit comments

Comments
 (0)