pbi_dax_query
Run DAX queries in Power BI Desktop and retrieve the result grid. Overwrites editor content; use for temporary queries.
Instructions
Write DAX into the DAX query view editor and RUN it, then read the results grid. Reaches the daxQueryView CDP target (SEPARATE from reportView); {ok:false, reason} if the view has never been opened in Desktop (open the DAX query view tab first — this tool will NOT open ribbon views). Runs via F5 on the focused editor, falling back to a visible "Run" button. Returns {ran, columns, rows, rowCount, error?}. CAVEAT: this OVERWRITES whatever DAX the user had in the query editor — prior text is NOT restored (unrecoverable). Use a throwaway query view.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dax": "<dax>"
},
"name": "pbi_dax_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dax | Yes | The DAX to run (EVALUATE …). Overwrites the editor content. | |
| timeoutMs | No | How long to poll for results (default 30000) |