Analytics · built as code07
Click-built dashboards quietly drift apart.
finance-bi-project — Power BI authored as text synthetic data
finance-bi-project
Model
tables.tmdl
relationships.tmdl
measures.tmdlDAX
Report
report.pbir
pages.json
definition
project.pbip
README.mdproject
1# finance-bi-project
2# A complete Power BI report — authored as TEXT, not clicks.
3
4· semantic model → Model/*.tmdl # tables, joins, DAX
5· report visuals → Report/*.pbir # pages + visuals as JSON
6
7# Source of truth is code — it diffs, reviews, rebuilds
8# off the ERP. No dragging fields. No silent drift.
finance-bi-project
Model
tables.tmdl
relationships.tmdl
measures.tmdlDAX
Report
report.pbir
pages.json
measures.tmdlTMDL
1table FactReceivables
2 column InvoiceAmount = int
3 column DueDate = dateTime
4
5relationship FactReceivables[CustKey] DimCustomer[CustKey]
6
7 measure Total AR = SUM( FactReceivables[InvoiceAmount] )
8
9 measure DSO =
10 DIVIDE( [Total AR], [Daily Revenue] )
11 // days sales outstanding — one definition, every report
finance-bi-project
Model
measures.tmdlDAX
Report
report.pbir
pages.json
report.pbirPBIR · JSON
1{ "page": "Finance Overview",
2 "visuals": [
3 { "type": "card", "measure": "DSO" },
4 { "type": "card", "measure": "Total AR" },
5 { "type": "bars", "title": "AR ageing" },
6 { "type": "column", "title": "Budget vs Actual",
7 "axis": "CostObject" },
8 { "type": "card", "measure": "Revenue" }
9 ] } // visuals generated programmatically — not placed by hand
Finance Overview— rendered from report.pbir · syntheticbuilt from code
DSO — days sales outstanding 52days vs 60-day terms · +4 vs LY
Total AR 148Cr across 9 cost objects · on plan
AR ageing
0–30
62%
31–60
24%
61–90
9%
90+
5%
Budget vs Actual — by cost object
BudgetActual
Plant A
Plant B
R&D
SG&A
Capex
measures.tmdlTMDL · editing
7 measure Total AR = SUM( FactReceivables[InvoiceAmount] )
8
9 measure DSO =
10 DIVIDE( [Total AR], [Daily Revenue] )
11 // one definition, every report follows
12
13 // commit ─ versioned · reviewable · rebuilds off ERP
Finance Overviewrecomputed
DSO — days sales outstanding 52days vs 60-day terms · −5 after fix ✓ updated
Total AR 148Cr net of credit notes ✓ updated
AR ageing
0–30
64%
31–60
23%
61–90
9%
90+
4%
✓ updated
Budget vs Actual — by cost object
BudgetActual
Plant A
Plant B
R&D
SG&A
Capex