# Project 03: Executive Business Intelligence

A browser dashboard and reporting-system demonstration built by ONE Light Analytics. Microsoft AdventureWorksDW is fictional sample data, not a client dataset. The full interactive project runs as a static website without Power BI, a database server, API keys or a paid subscription.

## Source and reproduction
Download and extract Microsoft's source release:
https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorksDW-data-warehouse-install-script.zip

Source documentation:
https://github.com/microsoft/sql-server-samples/tree/master/samples/databases/adventure-works

Run from the website repository root:
```sh
python3 projects/executive-bi/build.py --source /path/to/extracted/release --site .
node projects/executive-bi/test-model.mjs
python3 -m http.server 8765
```
Open `/pages/case-executive-bi.html` through the HTTP server. Direct file opening can block the dashboard's data request.

## Transformation
Parse source table columns from the release's schema script. Check unique sales-line keys and dimension references. Accumulate source amounts as integer units of 0.0001 to preserve exact reconciliation. Retain calendar periods 2011, 2012 and 2013. Reseller records end on 29 November 2013, so full-year and Q4 prior-year comparisons involving that channel are suppressed. Group sales by month, channel, sales-territory country and category while retaining distinct order membership. Select the last inventory record at or before each year end per ProductKey. Do not sum daily balances.

Source-row counts, SHA-256 hashes, partial-year exclusions, metric controls and reconciliation checks are in `validation.json`. The financial measures are sales and gross contribution after product cost, not a complete profit-and-loss statement. Source reporting monetary values are used directly; no FX conversion is applied.

## Components
- `build.py`: standard-library data preparation and validation.
- `../../assets/data/executive-bi/dashboard.json`: derived dashboard data.
- `../../js/executive-bi-model.mjs`: shared filter and metric calculations.
- `../../js/executive-bi.mjs`: accessible controls, charts, tables and reporting actions.
- `kpi-dictionary.csv`: metric definitions and ownership recommendations.
- `reporting-guide.md`: interpretation and reporting rhythm.
- `model/`: portable tables for an optional Power BI implementation.

The browser dashboard is the completed published product. An optional Power BI Desktop implementation has a separate guide and requires external native-application verification. No PBIX file is claimed or supplied.

## Attribution
Source: Microsoft SQL Server Samples, AdventureWorksDW. Microsoft source licence is preserved in `MICROSOFT-LICENSE.txt`. Analysis, interface and documentation: ONE Light Analytics.
