Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric certified for FREE! Don't miss your chance! Learn more
Transform hours of manual model tuning into an intelligent, guided workflow using the Best Practice Analyser (BPA) in Tabular Editor and Claude AI
I recently came across a video and blog post from 2021 by Michael Kovalsky from the Power BI Customer Advisory Team that discusses how to enhance the performance of a Power BI semantic model using Tabular Editor 2. The post explains how to run a Best Practice Analyzer against your Power BI semantic model to identify weak points, particularly related to performance. The technique is solid, but there is one major drawback: manually fixing hundreds of violations is mind-numbing work.
Fast forward to today, and we now have a game-changer. The powerbi-modeling-mcp server for Claude Desktop can automate this entire process while keeping you fully in control.
Run the Best Practice Analyzer on any real-world Power BI model and you'll likely see something like this:
Even a small sized model can surface 200+ recommendations across categories like:
Performance: Bi-directional relationships on high-cardinality columns, unpartitioned large tables, auto-date tables
DAX Quality: Division operators instead of DIVIDE(), IFERROR usage, improperly qualified column references
Formatting: Missing data categories, exposed foreign keys, unmarked primary keys
Maintenance: Unused columns, orphaned tables, unreferenced data sources
Clicking through each one to understand, fix, test, and validate takes a lot of time.
With Claude Desktop connected to your Power BI model via the powerbi-modeling-mcp server, you get an AI agent that understands Power BI semantics, can read your model structure, and systematically apply fixes—all while explaining each change and checking for potential issues.
Tabular Editor 2 (the free version—no need for TE3)
Claude Desktop with powerbi-modeling-mcp server configured
Your Power BI model (.pbix or .pbit file) and a backup of your model (seriously—create one before starting)
How to install and setup your MCP server see here: Get started with the remote Power BI MCP server - Power BI | Microsoft Learn and here: GitHub - microsoft/powerbi-modeling-mcp: The Power BI Modeling MCP Server, brings Power BI semantic ...
Open your model in Tabular Editor 2:
Run the analyzer:
Open Claude Desktop and use this prompt structure:
Task: Optimize Power BI Semantic Model Using Best Practice Analyzer Step 1: Connect to ModelConnect to the Power BI semantic model file: [path/to/your_file.pbix] Step 2: Analyze and Apply ImprovementsReview the following Best Practice Analyzer violations and apply corrections sequentially. Step 3: Safety FirstBEFORE applying any correction, evaluate:- Will this break existing calculations, relationships, or functionality?- Could this cause the model to fail or become unstable? If potential issues are identified, skip that violation and request my approval before proceeding. Step 4: Document EverythingLog each change: object name, property modified, old value, new value.
Claude will connect to your model and be ready to process violations.
For a comprehesive Prompt guide you can download this prompt file from the attachement and adopt it for your use case.
This is crucial: don't paste all 200 violations at once. Instead, work in logical groups:
Batch 1: All formatting violations (safest to start)
Batch 2: Simple DAX improvements (DIVIDE, qualified references)
Batch 3: Performance optimizations (hiding columns, marking keys)
Batch 4: Maintenance items (removing unused objects)
Copy one batch of violations from the BPA window and paste them into Claude. The agent will:
After Claude processes a batch:
If something breaks, restore from your backup and proceed more cautiously with that specific type of change.
Note, that sometimes a refresh of your model is required.
Want to know what a specific BPA rule actually does?
Each rule includes an explanation of the best practice and why it matters—often with links to detailed Microsoft documentation.
Start with formatting: These changes are typically safe and give you confidence in the process
Test incrementally: Never apply 50+ changes without validating between batches
Read the rules: If you don't understand why a rule exists, look it up before applying the fix
Version your backups: Create dated copies as you progress (Model_Jan30, Model_Jan31, etc.)
Review Claude's log: The agent documents every change—use this as your change record
You're the expert: Claude automates the mechanics, but you make the final call on complex scenarios
Create a project in Claude AI so you can use the BPA on each of your models during development just with a simple prompt.
Before: Manually reviewing and fixing 200+ violations across a production model = 4-6 hours of tedious point-and-click work
After: Claude processes batches in minutes while you review, validate, and make strategic decisions = 45-60 minutes of focused oversight.
Hope that helps. Drop your questions in the comments.
Resources
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.