execute_dax_query
Run DAX EVALUATE queries against a Power BI dataset to retrieve data such as aggregated sales totals or top-ranked products, returning the query results for analysis and reporting.
Instructions
Execute a DAX query against a Power BI dataset (semantic model) and return the results.
Use this tool to query data from Power BI semantic models using DAX (Data Analysis Expressions). The query must be a valid EVALUATE statement.
Examples:
EVALUATE SUMMARIZECOLUMNS('Date'[Year], "Total Sales", SUM('Sales'[Amount]))
EVALUATE TOPN(10, 'Products', 'Products'[Revenue], DESC)
EVALUATE ROW("Total", CALCULATE(SUM('Sales'[Amount])))
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": {
"datasetId": "<datasetId>",
"query": "<query>"
},
"name": "execute_dax_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The DAX query to execute. Must be a valid EVALUATE statement. | |
| datasetId | Yes | The dataset (semantic model) ID to query. | |
| workspaceId | No | The workspace (group) ID. Omit for 'My Workspace'. |