business analytics
slug: recipe-business-analytics-what-contributed-to-changes-from-one-period-to-the-nextcategory: business analytics
Executives want to know what drove changes between time periods:
Follow these steps to calculate how various segments contribute to changes from one period to the next:
compareBy time dimension, measure, and metriccube step -> contribution step -> [step-rank] -> chart step
sales_cube — multi-dimensional aggregated dataset from cube stepcompareBy column (e.g., month, quarter) and aggregated measure columns (e.g., revenue.sum)contribution_analysis — dataset with contribution of each segment to total change between periodstransition, baseValue, compareValue, contribution, contributionPct, growthRate| Step | Purpose | Notes |
|---|---|---|
| cube step | Aggregate metrics across dimensions | Example: total revenue by product × region × quarter |
| contribution step | Compute change and attribution | Example: compareBy=quarter, measure=revenue, metric=sum |
| [step-rank] | Optionally rank segments by contributionPct | Identify top drivers of change |
| chart step | Visualize contributions | Optional waterfall chart, bar chart, or heatmap |
compareBy column is correctly typed and consistentcontributionPct sums to 100% within each level
title: "Contribution analysis of period-over-period changes"
category: "business analytics"
difficulty: "Intermediate"
tags: [contribution, cube, period-over-period, variance]
inputs: [sales_cube]
outputs: [contribution_analysis]
steps: [step-cube, step-contribution, step-rank, step-chart]
author: "Tom Argiro"
last_updated: "2025-10-25"
doc_type: "recipe"