# 102. Demand reliability with Power BI

**Decision question:** Where does a better next-day demand forecast still underpredict, and how much of the evaluation calendar is observed?

This is an advanced BI extension of an existing portfolio study. It adds a reproducible analytical data mart, an editable native Power BI project, explicit KPI definitions and a review workflow.

## Result

The model underpredicts in 63.8% of observed hours despite an 11.5% overall MAE improvement. Forty of 2,928 evaluation-calendar hours have no observed target.

On working-day evening commute hours, model MAE is 123.63 versus 121.31 for the baseline: 1.9% worse despite the overall improvement. This exploratory slice shows why the aggregate score is insufficient for planning.

![Computed analysis chart](outputs/chart.png)

This figure is generated with Python from the same prepared results. It is an analytical chart, **not a screenshot of Power BI**.

## Power BI report

1. **Forecast reliability** — 9 report visuals, including interactive slicers and data-bound charts.
2. **Underprediction & daily patterns** — 9 report visuals, including interactive slicers and data-bound charts.
3. **Calendar coverage** — 9 report visuals, including interactive slicers and data-bound charts.

The project contains 17 DAX measures and 2 active single-direction relationships. [Open the native project](powerbi/DemandReliability.pbip), review the [data model](DATA_MODEL.md), and inspect the [measure definitions](MEASURES.md).

**Validation status:** Python analysis executed; report schemas and field references checked. Power BI Desktop is not installed in the authoring environment, so native refresh, DAX execution and page rendering are **not yet verified**. The files are PBIP/PBIR source projects, not compiled PBIX files or published Power BI Service dashboards.

## Use the report

1. Extract the complete Power BI bundle. Preserve its folders.
2. If it has moved, run `powerbi/Set-DataFolder.ps1` to set the data location, or edit the `DataFolder` parameter to the full path ending in `data/powerbi/`.
3. Open `powerbi/DemandReliability.pbip` in Power BI Desktop with Power BI Project/PBIR support enabled.
4. Select **Refresh**. Compare the overview metrics with [metrics.json](outputs/metrics.json).
5. Try the date/category slicers. See [RUNBOOK.md](RUNBOOK.md) for validation and refresh details.

## Method and action

One row per observed held-out hour, calendar and hour dimensions, 17 DAX measures, weighted error calculations, coverage denominators, and monthly/time-of-day diagnostics.

Prioritize underprediction diagnostics by time of day, check whether missing hours cluster, and obtain service costs and current operational data before changing planning policy.

This report reuses the original forecast holdout; it is a diagnostic extension, not fresh validation. Prediction gaps do not measure unmet rental demand or required inventory. Native Power BI refresh and rendering remain unverified because Desktop is not installed.

## Reproduce the analysis

Use the complete collection, with Python 3.12 and `requirements.txt` installed. From its root:

```powershell
python projects/102-demand-reliability-powerbi/analysis.py
python -m powerbi.validate
```

Original source downloads and baseline analyses must exist first; the root README documents them. The [executed notebook](analysis.ipynb) displays the transformation code, reruns preparation, rebuilds native report files, and shows computed evidence. Shared implementation is in `powerbi/prepare.py`, `powerbi/author.py` and `powerbi/validate.py`.

## Sources and implementation references

- [UCI source dataset](https://archive.ics.uci.edu/dataset/275/bike+sharing+dataset), transformed and aggregated under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
- [Microsoft: Power BI report project files](https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-report).
- [Microsoft: semantic model project files](https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-dataset).
- [Microsoft: gzip decompression in Power Query](https://learn.microsoft.com/en-us/powerquery-m/binary-decompress).

Related studies may reuse data and holdouts. No employment relationship, commercial uplift, current operational performance or causal effect is inferred.
