Skip to content

Commit

Permalink
Update semantic-layer-6-advanced-metrics.md (#4789)
Browse files Browse the repository at this point in the history
## 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."
  • Loading branch information
mirnawong1 authored Jan 25, 2024
2 parents 7fbd066 + 944f238 commit 0b26ef4
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ We're not limited to just passing measures through to our metrics, we can also _

```YAML
- 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
description: The revenue from food in each order.
label: Food Revenue
type: simple
type_params:
measure: food_revenue
```
- 📝 Now we can set up our ratio metric.
Expand Down

0 comments on commit 0b26ef4

Please sign in to comment.