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.
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) |