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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dax_query | Yes | ||
| dataset_id | Yes | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||