Week Prior Year (WPY)
YAML type: wpy | Category: Periodic
Compares the current week to the same calendar week in the prior year.
Description
WPY is week-level year-over-year comparison with optional sum/average aggregation.
How it works

Week Prior Year aggregates the current week the same way as WoW, then compares it to the same calendar week in the prior year.
This reduces daily noise while keeping seasonal week context. Use it when weekly seasonality matters more than consecutive-week swings.
Setup
Same parameters as WoW; ensure >= ~1 year of history.
Configure detectors on the data view Analysis tab or in YAML. Validate with Data Preview before enabling production schedules.
Settings
| Parameter | Default | Description |
|---|---|---|
percentualChange |
50 |
Minimum absolute % change |
mode |
both |
Direction -- see Allowed values |
aggregateMode |
sum |
Period aggregation -- see Allowed values |
Allowed values
mode
| Value | Meaning |
|---|---|
above |
Flag increases / values above the comparison (or high side of a band) |
below |
Flag decreases / values below the comparison (or low side of a band) |
both |
Flag either direction |
aggregateMode
Used when the detector compares period totals (week / month / quarter), not raw daily points.
| Value | Meaning |
|---|---|
sum |
Compare sums of daily values in the period (default) |
average |
Compare averages of daily values in the period |
Shared series filters
Most detectors also accept optional series filters in params:
| Parameter | Purpose |
|---|---|
maxGapAmount |
Skip series when gap amount is too high (null = no limit). Catalog create-default is often 5. |
minValue |
Skip series whose average value is below this (null = no limit). Catalog create-default is often 1000. |
maxValue |
Skip series whose average value is above this (optional; omit/null = no limit) |
useSpecialDates |
When true, suppress anomalies that overlap special dates |
When a filter skips a series, Data Preview shows the reason.
Configuration example
analysis:
detectors:
- type: wpy
params:
percentualChange: 35.0
mode: both
aggregateMode: sum
Using the detector
Useful when weekly seasonality dominates daily noise.
Use cases
- Seasonal retail weeks
- Tourism and travel demand
- Marketing calendar YoY