Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-2217] [Feature] Support period-over-period calculations at query time #1220

Open
3 tasks done
Jstein77 opened this issue May 16, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
enhancement New feature or request Medium priority Created by Linear-GitHub Sync Metricflow Created by Linear-GitHub Sync Todo

Comments

@Jstein77
Copy link
Contributor

Jstein77 commented May 16, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing metricflow functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Problem Overview

It’s common for customers to need to calculate the period-over-period change of a metric. Some common examples of this are measuring headcount change quarter over quarter, or tracking year-over-year revenue growth. Our current path for supporting period-over-period calculations in the semantic layer is to use derived metrics and offsets to create a new metric that explicitly tracks the period-over-period value. This leads to extra YAML boilerplate in your configs that your data engineering team now needs to manage.

We want to reduce the amount of configuration your data team needs to manage. Implementing period-over-period calculations currently means that a single revenue metric balloons into every combination of period comparison that you need, i.e., revenue_quarter_over_quarter, revenue_year_over_year, revenue_month_over_month, etc. Instead of forcing customers to configure static period-over-period metrics in configs, we should be able to dynamically calculate the period-over-period value at query time. This means you only need to configure your revenue metric once to make any period-over-period view available to your organization.

Proposed Solution

Our proposed solution is to allow users to select a period-over-period comparision at query time. An example using the cli syntax is dbt sl query --metrics revenue__mom --group by metric_time__day. This query would return the value month over month percentage change of revenue grouped by day.

Describe alternatives you've considered

You can define separate metrics for period over period calculations that explicitly define the offset in the metric configurations.

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

SL-2217

@Jstein77 Jstein77 added enhancement New feature or request triage Tasks that need to be triaged labels May 16, 2024
@Jstein77 Jstein77 changed the title [Feature] Support period-over-period calculations at query time [SL-2217] [Feature] Support period-over-period calculations at query time May 16, 2024
@Jstein77 Jstein77 added Todo Metricflow Created by Linear-GitHub Sync Medium priority Created by Linear-GitHub Sync and removed triage Tasks that need to be triaged labels May 16, 2024
@Jstein77 Jstein77 removed this from the v.21 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Medium priority Created by Linear-GitHub Sync Metricflow Created by Linear-GitHub Sync Todo
Projects
None yet
Development

No branches or pull requests

2 participants