DAZL Documentation | Data Analytics A-to-Z Processing Language


Contents

What contributed to changes from one period to the next

business analytics

slug: recipe-business-analytics-what-contributed-to-changes-from-one-period-to-the-next

Recipe: Contribution analysis of period-over-period changes

category: business analytics

Problem

Executives want to know what drove changes between time periods:

  • Which segments contributed most to revenue growth or decline?
  • What drove quarter-over-quarter changes by product, region, or category?
  • Attribution for decision-making and prioritization

Solution

Follow these steps to calculate how various segments contribute to changes from one period to the next:

  • ensure the dataset is aggregated by relevant dimensions and measure using cube step
  • apply contribution step specifying the compareBy time dimension, measure, and metric
  • review contributions by segment
  • optionally filter step or [step-rank] to highlight top drivers
  • visualize results for executive reporting using print step or chart step

Step Sequence

cube step -> contribution step -> [step-rank] -> chart step

Input Datasets

  • sales_cube — multi-dimensional aggregated dataset from cube step
  • Notes: must contain compareBy column (e.g., month, quarter) and aggregated measure columns (e.g., revenue.sum)

Output Dataset

  • contribution_analysis — dataset with contribution of each segment to total change between periods
  • Notes: columns include transition, baseValue, compareValue, contribution, contributionPct, growthRate

Step-By-Step Explanation

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

Variations & Extensions

  • Apply filter step upstream to focus on specific regions, products, or time periods
  • Combine with pareto step to identify which segments matter most
  • Feed into index step to analyze efficiency vs. volume
  • Integrate with dashboards or executive reports

Concepts Demonstrated

  • Period-over-period variance decomposition
  • Attribution of change to segments
  • Integration with multi-dimensional cubes
  • Sequencing analytics for actionable insight

Related Recipes

  • Multi-dimensional analysis using cubes
  • Pareto analysis of contributions
  • Index analysis for efficiency

Notes & Best Practices

  • Ensure compareBy column is correctly typed and consistent
  • Input data should be pre-aggregated to the desired level
  • Document measure and metric used for reproducibility
  • Always check that contributionPct sums to 100% within each level

Metadata


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"