Lead Analyst & BI Architect: ETL, star schema, DAX, PBIR
LiveMzigo Chakula: Kenya Food Price Inflation BI
20 years of county-level staple prices modeled in a 4-table star schema
- 55,692 rows
- 233 markets · 27 counties
- 15 DAX measures
- 46 PBIR visuals
Lead Analyst & BI Architect: ETL, star schema, DAX, PBIR
Live20 years of county-level staple prices modeled in a 4-table star schema
National food inflation headlines hide wide county-level gaps. A household in Turkana faces a different price path than one in Nairobi or Mombasa. Planners need market-level visibility into which counties, staples, and seasons carry the heaviest food-price burden.
National CPI headlines compress Kenya into a single inflation rate, masking sharp regional divergence between Turkana, Nairobi, and Mombasa. With multiple commodities reported per market-month in the World Bank RTFP table, naive row averages double-count composite market indices unless the measure deduplicates at the market-month grain.
Built a Git-trackable Power BI project (PBIP/TMDL) and Python validation pipeline on the World Bank Real Time Food Prices (RTFP) dataset for Kenya: 55,692 market records across 233 physical markets, 27 counties, and 238 consecutive months (January 2007 to October 2026). Modeled a 4-table star schema (dim_markets, dim_date, dim_commodity, fact_prices) with single-direction 1:* relationships, 4 Power Query M scripts, 15 DAX measures, and a 4-page PBIR report with 46 visuals.
Flat Survey CSV
Manual Pivot
Unversioned binary .pbix files
PBIP/TMDL Star Schema
15 DAX + 46 Visuals
Git-diffable schema + Python pytest validation
Because fact_prices stores multiple commodity observations per market-month, averaging food_price_index directly would weight markets with more rows heavier. The National Food Price Index uses AVERAGEX(SUMMARIZE(fact_prices, fact_prices[mkt_id], fact_prices[date_key]), ...) to enforce one observation per market-month, while PBIP/TMDL storage keeps every M script, relationship, and visual reviewable in Git alongside Python tests.
Market-Month Deduplicated Food Price Index (DAX)
pbip/mzigo-chakula.SemanticModel/definition/tables/fact_prices.tmdlNational Food Price Index :=
AVERAGEX(
SUMMARIZE(fact_prices, fact_prices[mkt_id], fact_prices[date_key]),
CALCULATE(AVERAGE(fact_prices[food_price_index]))
)Screenshots and schema diagrams exported from the live app or public repository. Select any frame to inspect at full resolution.
Page 1: Executive Pulse
238-month National Food Price Index trend alongside top 10 counties ranked by recent 12-month YoY inflation.
Page 2: County & Commodity Matrix
Side-by-side comparison of beans, maize, and goat price paths between ASAL and agri-urban counties.
Page 3: Trends & Diagnostics
Coefficient-of-variation volatility tracking and seasonal price decomposition across 233 physical markets.
Page 4: Decisions & Action
Actionable county watchlist thresholds highlighting localized price spikes for intervention planners.
4-Table TMDL Star Schema
Single-direction 1:* relationships defined in Git-diffable TMDL with dim_markets, dim_date, dim_commodity, and fact_prices.
Inspect the source code, tests, and CI configuration on GitHub.
Working on something similar, or want this build verified? Ask me anything.
Get in touch