AVG of absolute percentage error
Compute MAPE per SKU using STATISTICAL forecast vs actuals. Show sku_id and mape.
| Column | Type | Key |
|---|---|---|
| actual_id | INT | PK |
| sku_id | INT | FK → dim_skus |
| location_id | INT | FK → dim_locations |
| period_date | TEXT | |
| units_sold | INT | |
| revenue | REAL |
| Column | Type | Key |
|---|---|---|
| forecast_id | INT | PK |
| sku_id | INT | FK → dim_skus |
| location_id | INT | FK → dim_locations |
| version_id | INT | FK → dim_forecast_versions |
| forecast_period_date | TEXT | |
| forecast_generated_date | TEXT | |
| forecast_qty | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
MAPE is mean absolute percentage error: |error| as a fraction of actual, averaged. You'll need both fact tables aligned on the same SKU+period.
Filter version_id = 1 (STATISTICAL).
AVG(ABS(actual - forecast) / actual).