execute_dax_query
Execute DAX queries against Power BI datasets to retrieve and analyze table data. Requires workspace and dataset IDs, and a query starting with EVALUATE.
Instructions
Execute a DAX query against a dataset.
This tool executes DAX (Data Analysis Expressions) queries against Power BI datasets. DAX queries must use the EVALUATE keyword for table expressions.
Args: workspace_id: The unique identifier of the Power BI workspace (UUID format). dataset_id: The unique identifier of the dataset (UUID format). dax_query: The DAX query text to execute. Must start with EVALUATE for table queries.
Returns: Query results with tables and rows, or error information if the query fails.
Common errors:
400 Bad Request: DAX syntax errors, invalid table/column references
403 Forbidden: Missing permissions or tenant setting not enabled
Limitations: Max 100,000 rows or 1,000,000 values per query
Example DAX query: EVALUATE TOPN(10, 'Sales')
Raises: ToolError: If parameters are invalid or query execution fails
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": {
"workspace_id": "<workspace_id>",
"dataset_id": "<dataset_id>",
"dax_query": "<dax_query>"
},
"name": "execute_dax_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dax_query | Yes | ||
| dataset_id | Yes | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||