Define the base metric (e.g., revenue) as a simple metric in your semantic model
Create a second derived metric entry with type: derived, an expr referencing the base metric, and add an input_metrics block listing the base metric with an offset_window value such as 1 month or 7 days
Add a third derived metric that subtracts the offset metric from the current-period metric using expr to produce the absolute change, or divides them to produce a growth rate
Set join_to_timespine: true on the derived metric so that missing periods are filled rather than omitted from results
Validate with dbt sl query --metrics revenue_wow_growth --group-by metric_time__week and inspect that prior-period values align correctly
Known gotchas
offset_window is specified on the individual input_metric entry inside input_metrics, not as a top-level key on the derived metric itself; placing it at the wrong level silently has no effect
MetricFlow joins data after aggregation when the query grain matches the offset grain; querying at a finer grain than the offset can produce unexpected NULL rows rather than shifted values
Derived metrics referencing offset input metrics cannot themselves be used as input_metrics in another derived metric that also has an offset; flatten the calculation into a single derived metric instead
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp