# dax

A skill for diagnosing and speeding up DAX queries in Power BI semantic models, working through slow measures tier by tier.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1104 repo stars
- Author: Kurt Buhler
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/semantic-models/skills/dax/SKILL.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/dax

## What it 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.

## Requirements
- Works with: Power BI

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add data-goblin/power-bi-agentic-development
```
In the agent chat (not a shell):
```text
/plugin install semantic-models@power-bi-agentic-development
```
This installs the whole semantic-models plugin with all its skills

2. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill dax -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/dax/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dax/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill dax -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dax/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill dax -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dax/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install data-goblin/power-bi-agentic-development plugins/semantic-models/skills/dax
```

2. **Manually: put the files in place**
- File: `.github/skills/dax/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add data-goblin/power-bi-agentic-development --skill dax -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/data-goblin/power-bi-agentic-development --path plugins/semantic-models/skills/dax
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dax/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/data-goblin/power-bi-agentic-development/tree/HEAD/plugins/semantic-models/skills/dax/SKILL.md

## When to use it
- 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
- Optimize the `Total Sales` measure, 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

## Similar
- [power-bi-dax-optimization](https://affpapa.org/en/nevibecode/skills/power-bi-dax-optimization.md) — skill · 9100 installs
- [DAX Terminal](https://affpapa.org/en/nevibecode/prompts/dax-terminal.md) — prompt · ★ 178201 repo stars
- [power-bi-dax-best-practices](https://affpapa.org/en/nevibecode/rules/power-bi-dax-best-practices.md) — rule · ★ 41430 repo stars
- [power-bi-build](https://affpapa.org/en/nevibecode/skills/power-bi-build.md) — skill · 688 installs
- [power-bi-salespulse-360-dashboard](https://affpapa.org/en/nevibecode/skills/power-bi-salespulse-360-dashboard.md) — skill · 661 installs
- [power-bi-retail-analytics-salespulse360](https://affpapa.org/en/nevibecode/skills/power-bi-retail-analytics-salespulse360.md) — skill · 659 installs

From the same set: [data-goblin/power-bi-agentic-development](https://affpapa.org/en/nevibecode/by/data-goblin/power-bi-agentic-development.md) — 59 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
