BIKit Lite
Fast, deterministic static linter for Power BI Project (PBIP) and TMDL models. Enforce architectural quality gates, catch DAX context transitions, and block anti-patterns before merging to main.
The in-browser playground below is live. The bikit CLI and the CI commands on this page are not published to npm yet, so npx bikit will not work until the first release.
Edit TMDL below or paste your model definition. Changes evaluate deterministically in real time.
┌────────────────────────────────────────────────────────┐
│ BIKit Lite — Power BI TMDL & PBIP Quality Gate │
└────────────────────────────────────────────────────────┘
Model Stats: 2 tables, 3 measures, 1 relationships
Duration: 1ms
Findings (10):
[WARN] BK_DAX_001: Unsafe Division Operator in DAX Measure
model.tmdl:6
Measure [Gross Margin] in table 'Sales' uses raw division operator '/'. Use DIVIDE() to protect against division by zero.
> [Total Profit] / [Total Revenue]
→ Fix: Wrap with DIVIDE(): DIVIDE([Profit], [Revenue])
[INFO] BK_DAX_003: Missing Format String on Numeric Measure
model.tmdl:6
Measure [Gross Margin] does not specify an explicit formatString property.
→ Fix: Specify formatString: "#,##0.00" or currency format in TMDL.
[WARN] BK_GOV_001: Undocumented Business Measure
model.tmdl:6
Measure [Gross Margin] lacks documentation or business description in TMDL metadata.
→ Fix: Add description: "Clear explanation of business logic" above the measure definition.
[ERROR] BK_DAX_002: Context Transition inside Row-by-Row Iterator
model.tmdl:9
Measure [Row Iteration Cost] calls measure references inside an iterator. This triggers row-to-filter context transition for every row in the iterated table.
> SUMX(Sales, [Gross Margin] * 1.05)
→ Fix: Precalculate the context or evaluate columnar operations directly inside the iterator.
[INFO] BK_DAX_003: Missing Format String on Numeric Measure
model.tmdl:9
Measure [Row Iteration Cost] does not specify an explicit formatString property.
→ Fix: Specify formatString: "#,##0.00" or currency format in TMDL.
[INFO] BK_DAX_003: Missing Format String on Numeric Measure
model.tmdl:13
Measure [Redundant Calc] does not specify an explicit formatString property.
→ Fix: Specify formatString: "#,##0.00" or currency format in TMDL.
[INFO] BK_DAX_004: Redundant CALCULATE Wrapper
model.tmdl:13
Measure [Redundant Calc] wraps a single simple aggregation in CALCULATE() without filter arguments.
> CALCULATE(SUM(Sales[Amount]))
→ Fix: Remove the outer CALCULATE() wrapper.
[WARN] BK_GOV_001: Undocumented Business Measure
model.tmdl:13
Measure [Redundant Calc] lacks documentation or business description in TMDL metadata.
→ Fix: Add description: "Clear explanation of business logic" above the measure definition.
[ERROR] BK_MOD_001: Bidirectional Cross-Filtering Relationship
Relationship between 'Sales'[CustomerKey] and 'Customer'[CustomerKey] has crossFilteringBehavior set to 'bothDirections'.
→ Fix: Change to single-direction filtering. Use CROSSFILTER() inside specific DAX measures if required.
[WARN] BK_MOD_004: Unsplit High-Cardinality DateTime Column
model.tmdl
Column 'Sales'[OrderDateTime] appears to be a combined DateTime column. High cardinality degrades VertiPaq compression.
→ Fix: Split into separate [Date] and [Time] columns in Power Query / ETL.
──────────────────────────────────────────────────────────
Quality Score: 46/100 | Status: FAILED (Quality gate threshold not met)
2 Errors, 4 Warnings, 4 Info
──────────────────────────────────────────────────────────Integrate BIKit Into Your CI Pipeline in 60 Seconds
Run automated quality gates on every Pull Request containing TMDL or PBIP semantic model changes.
name: Power BI Quality Gate (BIKit)
on:
pull_request:
paths: ['**/*.tmdl', '**/model.bim']
jobs:
bikit-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npx bikit lint . --format=github-pr >> $GITHUB_STEP_SUMMARY{
"minScore": 80,
"failOn": "error",
"ignoreRules": []
}BIKit Rule Directory (11 Deterministic Checks)
Every rule is deterministic, explainable, and backed by production Fabric/VertiPaq benchmarks.
Unsafe Division Operator in DAX Measure
Measure uses the raw '/' division operator instead of the safe DIVIDE() function.
Direct division by zero returns NaN or infinity in VertiPaq engine, which can crash front-end visual rendering or yield misleading totals. DIVIDE() provides safe default handling (BLANK or alternate result).
Context Transition inside Row-by-Row Iterator
Measure reference detected inside an iterator function (SUMX, AVERAGEX, FILTER).
Invoking a measure inside an iterator triggers row context to filter context transition for every row, converting a columnar VertiPaq scan into a slow row-by-row iteration.
Missing Format String on Numeric Measure
Numeric DAX measure does not define an explicit format string.
Measures without formatString render with arbitrary floating-point decimal precision in Power BI Service visuals and Excel Analyze in Power BI.
Redundant CALCULATE Wrapper
CALCULATE() wraps an expression without any filter modifier arguments.
CALCULATE with only 1 argument forces a context transition unnecessarily when executed in row context, and adds syntactic noise.
Full Table Scan in FILTER() Argument
FILTER() iterates an entire entity table rather than a single column or projection.
Passing a wide fact or dimension table into FILTER() forces VertiPaq to materialize all table columns in memory. Filtering a specific column (e.g., KEEPFILTERS(Sales[Status] = "Active")) allows storage engine bitmask filtering.
Bidirectional Cross-Filtering Relationship
Relationship has crossFilteringBehavior set to 'bothDirections'.
Bidirectional relationships cause ambiguous query filter paths, unpredictably inflate VertiPaq query times, and can produce mathematically incorrect totals across non-conformed dimensions.
Many-to-Many Relationship Without Bridge
Direct Many-to-Many relationship defined between model tables.
Direct Many-to-Many relationships bypass standard 1-to-Many VertiPaq hashing, resulting in slower in-memory joins and potential cross-filtering hazards.
Auto Date/Time Hierarchy Bloat
Dataset contains auto-generated hidden LocalDateTable entities.
Power BI's Auto Date/Time feature generates a hidden calendar table for every single date/time column in the model, bloating file size and RAM.
Unsplit High-Cardinality DateTime Column
Combined Date + Time column detected with timestamp precision.
VertiPaq compresses columns using run-length and dictionary encoding. A combined DateTime column can possess millions of distinct values, destroying compression efficiency.
Undocumented Business Measure
DAX measure lacks a business description in TMDL metadata.
Undocumented measures prevent self-service discoverability, break automated dictionary generation, and increase maintenance costs in enterprise models.
Calculated Column in Direct Lake Model
Calculated column defined on a Direct Lake table.
Fabric Direct Lake queries fallback to DirectQuery SQL endpoint whenever a visual requests a DAX calculated column, sacrificing VertiPaq in-memory performance.
Privacy: the analysis runs in your browser and your TMDL never leaves it. I only count that the tool was used and when a report is downloaded — no inputs, results or personal data are recorded.
Get the next Engineering Note
Practical DAX, semantic model and Fabric notes. 1–2 a month, unsubscribe any time.
Stop Semantic Regressions Before They Reach Production Fabric Capacities
Historically, Power BI models were binary black boxes (.pbix). Engineers could only discover expensive Cartesian joins or memory-bloating Auto Date/Time tables after reports were deployed and users complained. With TMDL (Tabular Model Definition Language), semantic models are human-readable text. BIKit turns that text into an automated CI quality gate.
Branching Discipline
Catch merge conflicts, invalid syntax, and missing format strings before a PR merges into your release branch.
Capacity Sizing Protection
Prevent high-cardinality DateTime timestamps and Direct Lake calculated column fallbacks that exhaust Fabric CUs.
Zero-Hallucination Gate
100% deterministic rule execution with clear error codes, specific line numbers, and actionable remediation formulas.
Frequently Asked Engineering Questions
Technical specifics on running BIKit in local and cloud CI/CD environments.
Does BIKit send our model metadata or connection strings to any cloud server?
No. BIKit Lite runs 100% locally on your machine or inside your GitHub Actions / Azure DevOps runner container. Zero telemetry, zero external network calls, and zero credentials transmitted.
How does BIKit handle both TMDL files and legacy model.bim?
BIKit automatically detects file extensions. If passed a folder, it scans recursively for *.tmdl definitions and any model.bim Tabular JSON files, unifying them into a normalized model representation for rule checks.
Can we customize thresholds or ignore specific rules?
Yes. Create a .bikitrc.json in your repository root with ignoreRules: ["BK_DAX_003"] or setminScore: 85. Flags like --fail-on=error ensure advisory warnings do not break builds during migration.
Does BIKit work with Azure DevOps Pipelines?
Yes. Simply add a Node.js task in your azure-pipelines.yml that executes npx bikit lint ./definition. The process exits with code 1 upon failure, properly halting pipeline deployment tasks.