Fix slow and expensive Power BI reports, with your AI agent and proof.
Find the slowest visuals and why. Let your agent rewrite the DAX. Ship it only when it is faster and gives the same answers under your report's own slicers and filters.
Windows · Runs on your PC · Nothing else to install · Every change is tested on a copy first
Contoso Sales Amount total DAX query ran 13.81× faster
Median query time fell from 1,297.3 ms to 93.9 ms over five alternating timing pairs on the saved Contoso model. All four selected queries returned matching answers.

A wrong change is blocked, with the exact row

Orchard sales model. The rewrite ignored the Grove slicer. Selecting District 5 and Grove 4 exposed the changed answer, so QueryTorque blocked delivery.
What it does
- Finds the slowest visuals. Times every chart's DAX on a private copy of your model and ranks them, slowest first.
- Shows why each one is slow. Storage-engine time, formula-engine time and query count per chart, plus the measures and columns behind it.
- Lets your agent write the fix. GitHub Copilot is connected the moment you install. Claude Code and Cursor connect with one command. Your agent gets the evidence and the tools; you stay in charge.
- Proves the answers didn't change. Every affected chart and measure is checked on the original and the changed model, including the slicer and filter combinations your report can actually show. If anything differs, you see the exact row: "With District 5 and Grove 4 selected, Slow Sales was 102,000,028 before and 407,995,190 after."
- Proves it's faster, honestly. The original and the changed copy are timed alternately in separate sessions. A chart is only called faster when the gain is at least 10% and holds every time; otherwise it says No clear change.
- Finds model waste. The largest columns, which slow charts read them, auto date tables and other size problems. A smaller model refreshes faster and uses less capacity.
- Delivers safely. Every change is built and checked on a separate copy. Only a change whose answers all matched, and whose saved copy reopened cleanly, can be delivered. Delivery goes to the prepared working copy, not your original report, unless you name your original PBIP project as the target. A byte-exact recovery copy is kept first, and one command rolls it back.
- Hands you a report. One self-contained HTML file for your team or client: what was slow, what changed, what was checked, before and after. An anonymised export (no DAX, names or values) is there for sharing publicly.
Why "expensive"?
Every time someone opens a slow report, its DAX runs again. On Fabric and Premium capacity that is compute you pay for, and it slows down everyone else sharing the capacity. Faster DAX and a smaller model mean fewer capacity units used, fewer throttling incidents and happier users.
Start in two minutes
- Install this extension. Python and every package are built in. There is no setup step.
- Try the demo (optional): run QueryTorque: Create Demo Report (Orchard). It builds an 8-million-row sales report with deliberately slow measures.
- Open your report: run QueryTorque: Help Me Fix This Slow Report and choose a PBIP folder or an import PBIX. A PBIX is copied to a separate PBIP, and your PBIX file is never changed. A workbench opens in your browser and ranks the slowest charts.
- Ask your agent: "Follow AGENT.md and make the slowest chart faster." It measures, plans a change, tests it on a copy and measures again.
- Review and deliver. The workbench shows before and after per chart, whether the answers matched, and what was and wasn't checked. Deliver when you're happy: the change goes into the prepared working copy, with a recovery copy kept. Roll back any time.
Prefer to drive it yourself? Measure Original Chart DAX, Test Native Change Plan on Copy, Measure Candidate Chart DAX and Open Native Investigation Workbench are in the Command Palette.
For AI agents
- Instructions: each investigation writes an
AGENT.md with five steps: measure, plan, test on a copy, measure again, then deliver with the user's approval. It includes a one-page guide to fixing slow DAX and to the traps that silently change answers.
- Tools: the QT:DAX MCP server is registered with VS Code automatically, so Copilot agent mode can call the
qtdax_* tools: workbook overview, bottlenecks, visual profile, measure forest, model statistics, chart explanations, candidate comparison and native trials. QT:DAX: Connect another agent adds the same server to a Claude Code or Cursor project after showing you the change.
- Chat:
@qtdax /sweep, /explain <visual-id>, /fix <bottleneck-id>.
- Guardrails: the agent can test as much as it likes on copies. It can also call delivery, but delivery refuses any change that didn't match every check or whose saved copy didn't reopen cleanly, and refuses if your report has changed since the test. By default it delivers to the prepared working copy, not your original, and it keeps a recovery copy before installing anything. Agent apps such as Copilot, Claude Code and Cursor ask before running a tool unless you've chosen to allow it automatically; keep delivery on "ask" so you approve it.
What "same answers" covers
Checks run on the saved data in your report. They cover every affected chart query, every affected measure, and the slicer and filter combinations that can be rebuilt from the report (up to 32 per chart). Combinations that can't be rebuilt, security roles, refresh and untested interactions are listed by name as not checked. Matching results are strong evidence for those cases, not a mathematical proof for every possible filter.
Requirements
- Windows x64 and VS Code 1.102 or later.
- Power BI Desktop (x64), installed.
- A report saved as PBIP with its local
.pbi/cache.abf, or an import-mode PBIX. DirectQuery and live-connected models aren't supported.
- The first run downloads Microsoft's Analysis Services client libraries once, from the official NuGet feed, pinned by hash.
Privacy and safety
- No telemetry. Everything runs on your PC.
- Your agent only sees what you choose to give it, under your agent provider's terms.
- Your original report isn't changed: delivery goes to the prepared working copy unless you name your original PBIP project as the target, and only after the change passed the checks. A PBIX is never changed. A recovery copy is kept before any delivery.
- Nothing is deleted without your approval. Removing a column needs a named approver.
- Restricted Mode and virtual workspaces disable the extension.
Not affiliated with Microsoft. Power BI is a trademark of Microsoft.
FAQ
Does it work on a Mac? Not directly: it uses Power BI Desktop's engine, and Power BI Desktop is Windows-only. From a Mac, connect VS Code to a Windows PC or cloud PC with Remote-SSH and install it there; it runs on the Windows side. Windows on ARM (for example Parallels on Apple silicon) is not supported yet.
Does it upload my workbook? No. Only what you choose to share with your agent leaves your PC.
Why block a change when almost every answer matches? One wrong number in one filter combination is enough to break trust in a report. You see exactly which one, so your agent can fix it and try again.
Why not trust the agent's own test? An agent that writes a change and then grades it is checking its own homework. This extension runs the comparison independently, on the real engine, against your original model.
Will my users see the same speed-up? The timings cover the chart's DAX on saved data. What people see also depends on rendering, their machine and the cache. Use --desktop for a separate Performance Analyzer measurement.
Something failed? Run QueryTorque: Run Workbook Doctor. It checks the built-in runtime, Power BI Desktop and the client libraries, and tells you the next step.
Licence? It is open source under the Apache License 2.0. Copyright 2026 QueryTorque. Dependencies keep their own notices.
Need help, or a wider review of your Power BI and data costs? querytorque.com
Settings
| Setting |
Default |
Meaning |
qtDax.pythonPath |
"" |
Developer override for an absolute Python path with QT:DAX already installed |
querytorque.workbook.offline |
false |
true = review saved files only, without native runs |
querytorque.powerbi.directory |
"" |
Set only if Power BI Desktop can't be found automatically |
querytorque.sidecar.port |
8042 |
Optional local sidecar port |
Runtime recovery
Reinstall the extension if its built-in runtime is damaged. There is no Python setup step.
For a local check, run runtime\python\python.exe -I -B -m qt_dax.cli.main --version from the extension folder.
Command reference
| Command ID |
Command palette label |
querytorque.fixSlowReport |
QueryTorque: Help Me Fix This Slow Report |
querytorque.nativePrepare |
QueryTorque: Start Native Power BI Investigation |
querytorque.nativeMeasureOriginal |
QueryTorque: Measure Original Chart DAX |
querytorque.nativeTestPlan |
QueryTorque: Test Native Change Plan on Copy |
querytorque.nativeMeasureCandidate |
QueryTorque: Measure Candidate Chart DAX |
querytorque.nativeOpenWorkbench |
QueryTorque: Open Native Investigation Workbench |
querytorque.getStarted |
QueryTorque: Get Started |
querytorque.createDemoReport |
QueryTorque: Create Demo Report (Orchard) |
querytorque.installCli |
QueryTorque: Check Built-in Runtime (Legacy) |
querytorque.updateCli |
QueryTorque: Check Built-in Runtime (Legacy) |
querytorque.checkPython |
QueryTorque: Check Built-in Runtime |
querytorque.cliStatus |
QueryTorque: Show QT:DAX Status |
querytorque.workbookDoctor |
QueryTorque: Run Workbook Doctor |
querytorque.selectWorkbook |
QueryTorque: Select Power BI Workbook |
querytorque.speedUpReport |
QueryTorque: Speed Up This Report |
querytorque.bottlenecks |
QueryTorque: Show Bottlenecks |
querytorque.importSweepEvidence |
QueryTorque: Import Sweep Evidence (PA, VPAX, Usage) |
querytorque.configureMcp |
QT:DAX: Connect another agent |
querytorque.prepareAgentHandoff |
QueryTorque: Prepare/Open Agent Handoff |
querytorque.compareCandidate |
QueryTorque: Compare Candidate Results and Timings |
querytorque.compareCapturedCandidate |
QueryTorque: Compare Candidate with Captured Power BI Contexts |
querytorque.openLatestComparison |
QueryTorque: Open Latest Candidate Comparison |
querytorque.comparisonHistory |
QueryTorque: Browse Candidate Comparisons |
querytorque.applyReviewedChange |
QueryTorque: Apply Reviewed Change |
querytorque.rollbackChange |
QueryTorque: Roll Back Applied Change |
querytorque.appliedHistory |
QueryTorque: Applied Change History |
querytorque.desktopConnect |
QueryTorque: Connect to Open Power BI Desktop |
querytorque.desktopStatus |
QueryTorque: Show Desktop Status |
querytorque.desktopHealth |
QueryTorque: Show Desktop Health |
querytorque.workbookRun |
QueryTorque: Run Workbook Review |
querytorque.openLatestReview |
QueryTorque: Open Latest Review Report |
querytorque.openLatestFixPack |
QueryTorque: Open Latest Fix Pack |
querytorque.startSidecar |
QueryTorque: Start Local Sidecar |
querytorque.stopSidecar |
QueryTorque: Stop Local Sidecar |
querytorque.openCliDocs |
QueryTorque: Open QT:DAX Help |
querytorque.logView.exportJson |
QueryTorque: Export QT:DAX Log as JSON |
querytorque.logView.exportCsv |
QueryTorque: Export QT:DAX Log as CSV |
querytorque.logView.clear |
QueryTorque: Clear QT:DAX Log |
querytorque.workbookBrief |
QueryTorque: Workbook Flow (Legacy) |
querytorque.workbookAudit |
QueryTorque: Workbook Review (Legacy) |
querytorque.openLatestAudit |
QueryTorque: Open Latest Review (Legacy) |
querytorque.logView.snapshot |
Internal: read-only log snapshot (hidden from the palette) |