dax — Claude Code skill: DAX query optimization
A skill for diagnosing and speeding up DAX queries in Power BI semantic models, working through slow measures tier by tier.
GPL-3.0 ★ 1,104 updated 2026-10-28
/plugin marketplace add data-goblin/power-bi-agentic-development
/plugin install semantic-models@power-bi-agentic-developmentWhat dax does
The skill fixes one convention for naming DAX objects: columns are written as 'Table'[Column] with the table name quoted, measures as [Measure] with no table prefix, since a measure belongs to the model rather than any single table. That convention carries through measures, calculated columns, RLS filters, format string expressions and DAX queries alike.
Its core is a workflow reference, dax-performance-optimization.md, built around a four-tier tuning framework with its own error-handling guide. Supporting files load on demand: engine-internals.md covers FE/SE architecture, xmSQL and segment compression, dax-patterns.md lists patterns DAX001–DAX021 plus query-shape patterns QRY001–QRY004, and model-optimization.md covers model patterns MDL001–MDL009 and Direct Lake patterns DL001–DL002.
For trace capture on local Power BI Desktop models it leans on the Tabular Editor CLI's te query or the companion connect-pbid skill; against remote Fabric Service models it runs the same te query over the workspace's XMLA endpoint. A Power BI Modeling MCP server is listed as a fallback for tracing and querying.
What it helps with
- track down why a measure evaluates slowly
- standardize how measures and columns are referenced across a model
- read xmSQL and segment compression behavior in the engine
- match a slow pattern to a model-level or Direct Lake fix
- capture an FE/SE trace for a query
Example prompts for the agent
- Optimize the
Total Salesmeasure, it's running slow - Walk through the FE/SE trace for this query and flag anti-patterns
- Check this model against the DAX001–DAX021 patterns
How to install dax
1Plugin marketplace
/plugin marketplace add data-goblin/power-bi-agentic-development/plugin install semantic-models@power-bi-agentic-developmentThis installs the whole semantic-models plugin with all its skills
2Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill dax -a claude-code3Manually: put the files in place
~/.claude/skills/dax/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dax/
1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill dax -a codex2Manually: put the files in place
.agents/skills/dax/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill dax -a cursor2Manually: put the files in place
.cursor/skills/dax/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install data-goblin/power-bi-agentic-development plugins/semantic-models/skills/dax2Manually: put the files in place
.github/skills/dax/SKILL.md1Skills CLI (Vercel)
npx skills add data-goblin/power-bi-agentic-development --skill dax -a gemini-cli2Platform CLI
gemini skills install https://github.com/data-goblin/power-bi-agentic-development --path plugins/semantic-models/skills/daxManually: put the files in place
.devin/skills/dax/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about dax
How to install dax in Claude Code?
Run /plugin marketplace add data-goblin/power-bi-agentic-development, then /plugin install semantic-models@power-bi-agentic-development.
What does the dax skill do?
It helps trace the cause of slow DAX queries and measures in Power BI semantic models and enforces a single convention for referencing model objects. It relies on a four-tier optimization framework with named patterns for diagnosis.
How does dax differ from the semantic-model skill?
dax focuses on DAX code performance and patterns, while semantic-model handles overall model design, build and auditing, including model-level DAX anti-patterns.