Skip to content

Metrics using depends_on don't support statistics #994

@scholtzan

Description

@scholtzan

See: https://mozilla.slack.com/archives/C4D5ZA91B/p1751303398463729

We had a case where a depends_on metric was used to define a ratio statistic. This is currently not supported in lookml-generator, but might be something we should investigate.

The example was:

[metrics.ecpm]
depends_on = ['revenue', 'milli_impressions']
data_source = "ad_metrics_daily"
type = "scalar"
friendly_name = "eCPM"
description = "effective CPM, calculated as average revenue per thousand impressions"


[metrics.revenue.statistics.sum]
[metrics.milli_impressions.statistics.sum]
[metrics.ecpm.statistics.ratio] # didn't show up in Looker
numerator = 'revenue.sum'
denominator = 'milli_impressions.sum'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions