run_dax_query
Execute arbitrary DAX queries against an open Power BI file to handle ad hoc aggregations, filtering, top-N, distinct lists, and candidate measure testing that higher-level tools miss.
Instructions
Run an arbitrary DAX query (an EVALUATE statement, optionally with DEFINE MEASURE/VAR blocks above it) against an open Power BI file. Use this for anything the higher-level tools (list_tables, list_measures, etc.) don't cover -- ad hoc aggregations, filtering, top-N, DISTINCT lists, testing a candidate measure definition, and so on.
Returns {"rows": [...], "row_count": n, "truncated": bool}. Results are
capped at max_rows; when truncated is true there were MORE rows than
were returned, so never draw a "this is everything" conclusion from a
truncated result -- aggregate in DAX (or raise max_rows) instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | Yes | ||
| max_rows | No | ||
| dax_query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||