Seasonality in E-commerce Analytics — How to Account for It in Your Reports
Contents
Your reports show a 30% sales drop in January compared to December. Is it a crisis, or simply seasonality? If you haven't properly modeled this in your reports, every such signal will trigger panic in the sales team and unnecessary meetings with management.
Why Seasonality Destroys Your MoM and WoW Reports
Month-over-Month and Week-over-Week comparisons are the default metrics in most e-commerce dashboards. The problem is that they're blind to seasonal patterns. A winter clothing store will always record dramatic drops in May — and that's exactly what you'd expect. But if your dashboard only shows raw MoM figures, your junior analyst will have a heart attack with every morning report.
Classic traps I see regularly in projects:
- No Year-over-Year benchmark — an absolute fundamental that's missing from a surprisingly large number of companies
- Ignoring day-of-week effects — Tuesday vs. Sunday can mean a 40-60% revenue difference
- Skipping the Black Friday effect — that week distorts all Q4 quarterly comparisons
- No correction for working days — February with 28 days vs. March with 31 will always lose
Building a Baseline Seasonality Model in Snowflake SQL
Let's start with what should be the foundation of every seasonal report — the seasonality index. You calculate it as the ratio of sales in a given period to the annual average, repeated across multiple years and then averaged.
WITH monthly_sales AS (
SELECT
DATE_TRUNC('month', order_date) AS month,
YEAR(order_date) AS year,
MONTH(order_date) AS month_num,
SUM(revenue) AS total_revenue
FROM orders
WHERE order_date >= DATEADD('year', -3, CURRENT_DATE)
GROUP BY 1, 2, 3
),
yearly_avg AS (
SELECT
year,
AVG(total_revenue) AS avg_monthly_revenue
FROM monthly_sales
GROUP BY year
),
seasonality_index AS (
SELECT
ms.month_num,
AVG(ms.total_revenue / ya.avg_monthly_revenue) AS season_index
FROM monthly_sales ms
JOIN yearly_avg ya ON ms.year = ya.year
GROUP BY ms.month_num
)
SELECT
month_num,
ROUND(season_index, 3) AS seasonality_index,
ROUND((season_index - 1) * 100, 1) AS deviation_pct
FROM seasonality_index
ORDER BY month_num;The result of this query gives you something concrete: month 12 with an index of 1.8 means December is historically 80% above the monthly average. Month 1 with an index of 0.6 is a normal 40% below average. Instead of an alarm, you have context.
YoY Comparison with Weekly Adjustment — a Practical Pattern
Plain YoY isn't enough when, for example, Easter falls in a different week each year. In Snowflake you can use the ISO week number as an anchor:
SELECT
YEAROFWEEKISO(order_date) AS iso_year,
WEEKISO(order_date) AS iso_week,
SUM(revenue) AS revenue_current,
LAG(SUM(revenue), 52) OVER (
ORDER BY YEAROFWEEKISO(order_date), WEEKISO(order_date)
) AS revenue_last_year,
ROUND(
(SUM(revenue) - LAG(SUM(revenue), 52) OVER (
ORDER BY YEAROFWEEKISO(order_date), WEEKISO(order_date)
)) / NULLIF(LAG(SUM(revenue), 52) OVER (
ORDER BY YEAROFWEEKISO(order_date), WEEKISO(order_date)
), 0) * 100, 1
) AS yoy_growth_pct
FROM orders
GROUP BY 1, 2
ORDER BY 1, 2;This LAG(..., 52) pattern over ISO weeks is one of those tricks that makes the difference between a dashboard that confuses people and one that actually helps drive decisions.
Seasonality in Tableau — How to Visualize It So It Makes Sense
With seasonality index data in hand, you can build a view in Tableau that immediately provides context. A few concrete tips:
Dual-axis with expected vs. actual — one axis shows the "expected sales" line (historical average × seasonality index), the other shows actual revenue. The deviation from that line is the real signal worth analyzing, not the absolute comparison on its own.
Weekly heatmap — a year × ISO week matrix colored by YoY growth. At a glance you can see which weeks are structurally weaker and which show a real upward or downward trend.
"Normalization" parameter — add a toggle to your dashboard that lets the user switch between raw sales and sales normalized by the seasonality index. Managers often want to see both views.
One mistake I see constantly: using a red-green diverging color palette without anchoring it to the seasonality index. A red December-to-January will always "alarm," even though it's a purely mechanical seasonal effect.
Keboola and Google Analytics 4 — Where to Source Seasonal Data
In practical Keboola projects, you collect seasonal data from several sources simultaneously. GA4 via BigQuery export gives you leading behavioral signals — spikes in sessions and internal searches often precede purchase spikes by 2-3 weeks. That's your early season indicator.
In Keboola, it's worth building a transformation that combines:
- Transaction data from your ERP/e-commerce platform (actual sales)
- GA4 data (traffic, purchase intent)
- External data — Google Trends API or macroeconomic data as contextual signals
The Snowflake SQL transformation in Keboola should generate a dim_seasonality table with indices at various granularities (day of week, ISO week, month), which you then join to fact tables in the reporting layer. Don't calculate seasonality indices on-the-fly in Tableau — that's an architectural mistake that will come back to bite you at scale.
TL;DR
- MoM and WoW without a YoY benchmark is a recipe for false alarms — always add year-over-year comparison as baseline context
- The seasonality index is your foundation — calculate it once in SQL, store it in the data layer, use it everywhere
- ISO weeks instead of calendar weeks — eliminates the moving holidays problem and normalizes 52-week comparisons
- In Tableau, separate signal from noise — dual-axis with expected vs. actual sales shows real deviations, not seasonal effects
- GA4 is a leading indicator — traffic and search spikes precede sales; use it to forecast the start of a season
Want to know where you lose customers?
I'll analyze your funnel and point out what to fix first. The first call is free.
Book a consultationMore articles about data analytics:
Back to blog