# bpa-expression-helper

bpa-expression-helper — a subagent for debugging, fixing, and explaining Best Practice Analyzer rule expressions with Dynamic LINQ and TOM properties in Power BI.

- subagent · `type=agent` · Claude Code, Codex, Cursor, GitHub Copilot · ★ 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/tabular-editor/agents/bpa-expression-helper.agent.md
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/bpa-expression-helper

## What it does

The subagent inspects Best Practice Analyzer (BPA) rule expressions for tabular data models. It detects syntax mistakes and broken logic in Dynamic LINQ code. When working through an issue, it uses the `Read`, `Grep`, and `Glob` tools to inspect definitions and cross-check rules against `skills/bpa-rules/references/expression-syntax.md`.

During evaluation, the assistant reviews the designated Scope and verifies string comparisons or equality operators. It catches frequent errors such as invalid property access across collections, measure attributes applied to column scopes, or missing `outerIt` qualifiers in nested calls. The subagent relies on `skills/bpa-rules/references/expression-syntax.md` to look up language details.

Every response follows a predictable layout. The agent states the root cause, delivers the corrected expression, clarifies why the update works, and suggests a simple test case to verify the fix.

## Requirements
- Works with: Power BI

## Install

### GitHub Copilot (native platform)

**Manually: put the files in place**
- File: `.github/agents/bpa-expression-helper.agent.md`

### Claude Code

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 tabular-editor@power-bi-agentic-development
```

2. **Manually: put the files in place**
- File: `.claude/agents/bpa-expression-helper.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention. Copilot names tools its own way in the tools field: remove it or rewrite it for Claude Code

### Codex

**Manually: put the files in place**
- File: `.codex/agents/bpa-expression-helper.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/bpa-expression-helper.md` — Cursor also reads .claude/agents/

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/tabular-editor/agents/bpa-expression-helper.agent.md

## When to use it
- debug failing Dynamic LINQ expressions in BPA rules
- resolve scope mismatches between measures and columns
- write filter expressions targeting unreferenced or hidden model objects
- fix nested LINQ queries missing `outerIt` references

## Example prompts
- My BPA rule does not trigger any warnings, can you check the syntax?
- Help me create an expression to flag measures that lack descriptions.
- Why does my rule fail to find hidden columns in this table?

## Similar
- [power-bi-dax-optimization](https://affpapa.org/en/nevibecode/skills/power-bi-dax-optimization.md) — skill · 9100 installs
- [power-bi-model-design-review](https://affpapa.org/en/nevibecode/skills/power-bi-model-design-review.md) — skill · 9000 installs
- [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
- [logifleet-pulse-supply-chain-analytics](https://affpapa.org/en/nevibecode/skills/logifleet-pulse-supply-chain-analytics.md) — skill · 659 installs
- [DAX Terminal](https://affpapa.org/en/nevibecode/prompts/dax-terminal.md) — prompt · ★ 178201 repo stars

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
