Skip to main content
subagent CX Codex

query-listener — Claude Code subagent: capture Power BI DAX

query-listener — a Claude Code subagent that hooks into the local Analysis Services instance and grabs the DAX a Power BI Desktop visual sends. Fire it off when you need to see the query behind a click.

GPL-3.0 ★ 1,104 updated 2026-10-28

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/query-listener.agent.md
Open on GitHub

What query-listener does

Under the hood the agent loads ADOMD.NET, reads the port of the running msmdsrv process from its command line, and opens a connection to that instance. It then polls DISCOVER_SESSIONS every 500 ms for up to 60 seconds, picking up sessions whose SESSION_LAST_COMMAND begins with DEFINE, EVALUATE or VAR. Duplicates are filtered out by the session timestamp.

Each captured query comes back with elapsed milliseconds, CPU time and the full DAX text. Once the run stops, the agent reports how many queries it caught, which one took longest, and any patterns worth a look — a missing filter context, an oversized TOPN, a pile of VAR blocks. Results land in a text file so they survive the agent finishing.

Its tool set is limited to Bash, Read and Write. ADOMD.NET has to be on the machine; the assembly is loaded from a local path, and without it the agent points you at the connect-pbid skill. Nothing shows up in the first 15 seconds more often than not, since slicers do not always fire a model query — click a regular visual instead.

What it helps with

  • see the exact DAX a single visual sends
  • time how long a visual's query takes
  • trace down why a matrix or chart runs slow
  • compare queries from several visuals side by side
  • keep captured queries in a file for later reading

Example prompts for the agent

  • Capture the DAX query my bar chart is sending
  • Start listening for visual queries while I click around the report
  • Grab the query and timing for my slow matrix

How to install query-listener

Manually: put the files in place

.github/agents/query-listener.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about query-listener

How do I install query-listener in Claude Code?

Add the marketplace with /plugin marketplace add data-goblin/power-bi-agentic-development, then install the plugin: /plugin install pbi-desktop@power-bi-agentic-development. The subagent ends up at .claude/agents/query-listener.md.

What does query-listener do?

It connects to the local Analysis Services instance behind Power BI Desktop and captures DAX queries from visuals as they happen. Every query comes back with elapsed time and CPU time.

What does query-listener need to run?

ADOMD.NET installed — the connection to Analysis Services cannot be built without it. The assembly loads from a local path, and if it is missing the agent sends you to the connect-pbid skill.

Similar subagents

All subagents for Data and databases →
Power BI Performance Expert Mode official github Power BI Performance Expert Mode — a Copilot subagent for slow Power BI models and reports: it walks through where the bottleneck sits, what to rewrite in DAX, and how to speed up DirectQuery. CX Codex +1 ★ 41,430repo stars powerbi-modeling official github The powerbi-modeling skill helps build and review Power BI semantic models, write DAX, and configure relationships. Use it when the model includes RLS or complex calculations. CX Codex +1 9,934installs SemanticOps MCP (for Power BI) maxanatsko SemanticOps MCP (for Power BI) is an MCP server that gives AI assistants direct access to Power BI Desktop files to work with DAX measures, table relationships, and model optimization. CX Codex +1 ★ 256repo stars power-bi-build gasserane power-bi-build scaffolds IPPF-branded Power BI projects and writes DAX measures directly to .pbip models. Requires Power BI Desktop and the pbi CLI. CX Codex +1 688installs power-bi-salespulse-360-dashboard reason-machines power-bi-salespulse-360-dashboard is a Claude Code skill for configuring the SalesPulse 360 Power BI dashboard. It activates for retail sales and profit analysis, regional reporting, forecasting, and alert setup. CX Codex +1 661installs power-bi-retail-analytics-salespulse360 reason-machines power-bi-retail-analytics-salespulse360 is a skill that deploys and tunes the SalesPulse 360 Power BI retail dashboard for revenue tracking, regional margins, and predictive forecasting. CX Codex +1 659installs

From the same set59

The whole set →
suggest-rule suggest-rule generates Best Practice Analyzer rules for Tabular Editor from plain text requirements or model files. CX Codex +1 ★ 1,104repo stars migrating-fabric-trial-capacities migrating-fabric-trial-capacities is a Claude Code command that moves Microsoft Fabric workspaces from trial to production capacity through fab CLI, logging each step. CX Codex +1 ★ 1,104repo stars dax A skill for diagnosing and speeding up DAX queries in Power BI semantic models, working through slow measures tier by tier. CX Codex +1 ★ 1,104repo stars 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. CX Codex +1 ★ 1,104repo stars lineage-analysis lineage-analysis finds every Power BI report tied to a semantic model across Fabric workspaces, without needing admin rights. CX Codex +1 ★ 1,104repo stars using-duckdb Query Delta tables and raw files in Fabric OneLake using DuckDB either on your machine or inside a Fabric notebook. CX Codex +1 ★ 1,104repo stars powerbi-custom-visuals powerbi-custom-visuals is a Claude Code skill for building interactive Power BI visuals with the pbiviz toolchain, from project setup through packaging and certification prep. It supports visuals reused across reports. CX Codex +1 ★ 1,104repo stars fabric-capacity fabric-capacity — a skill that tracks utilization of Microsoft Fabric capacities in real time, identifies which workloads consume CU, and manages capacity state through the API. CX Codex +1 ★ 1,104repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open