The complete dashboard is a portable snapshot, not a live business analytics service. A supplied standard-library exporter runs your reconciled SQLite queries over original CSV fixtures and emits an offline HTML report. You can inspect the SQL, data, calculations and interface without a subscription or hosted database.
The embedded report below uses that same materialized order grain. Change dates, segment and channel; watch every KPI, chart and table update together. Data is synthetic and money uses integer cents until display or ratio calculation.
The current window and prior window have the same inclusive length. The prior value for a day is available only if that shifted business date exists in the coverage calendar. A covered quiet date is zero; an uncovered date is unavailable.
Percentage change has an explicit policy. Unknown or zero prior values are undefined. Otherwise use 100 × (current − prior) / abs(prior). This convention handles negative adjustments consistently for this teaching report; it is not a universal business rule.
WITH t(current,prior) AS (VALUES(800,-500),(100,0),(100,NULL))
SELECT current,prior,CASE WHEN prior IS NULL OR prior=0 THEN NULL
ELSE 100.0*(current-prior)/ABS(prior) END AS change_percent FROM t;For the period KPI, first sum current and prior cents over their complete windows. Only show a prior total if every prior date is covered. Then calculate the ratio from those totals. Do not average daily percentages. The per-order average likewise divides total cents by total orders.
The chart domain includes zero and signed values, the channel bars start at zero, and the daily calendar retains quiet dates. Numeric tables and visible definitions provide a second reading path. Date inputs operate on normalized business dates rather than the viewer’s timezone.
The lab includes a schema, six actual query files, CSV inputs, a deterministic exporter, a starter query, a working dashboard and integration tests. Run the documented command, open the HTML file locally, then alter fixtures and rebuild. No remote database, cloud account or network execution is required.
WITH periods(current,prior) AS (VALUES(200,100),(1100,1000))
SELECT SUM(current) AS current_cents,SUM(prior) AS prior_cents,
100.0*(SUM(current)-SUM(prior))/ABS(SUM(prior)) AS period_change
FROM periods;Finish the native query, download the lab and run its tests. Confirm the default five orders and 5,750 cents; switch to a zero-activity selection, a negative-adjustment window and an uncovered-prior window. Compare the browser series with the SQL output before editing visual styling.
This completes the SQL snapshot. Power Query ingestion, semantic relationships, DAX measures, richer cross-filtering and publishing/collaboration are a useful next stage in Boot.dev’s Power BI course.
Download the complete SQL dashboard lab: queries, CSV fixtures, exporter, offline dashboard and tests.