Forum Discussion
PowerBI API not running query from executeQueries endpoint
- Anonymous2 years ago
HI tech49,
As the document mentions, current this API only support to send Dax query and T-SQL query should not be suitable for this API usages:
Executes Data Analysis Expressions (DAX) queries against the provided dataset. The dataset must reside in My workspace or another workspace.
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Data Analysis Expressions (DAX) Reference - DAX | Microsoft Learn
Regards,
Xiaoxin Sheng
Ok,
I found the first part of my problem, I serialised the JSON incorrectly.
I should have labelled the as a "query", as below
{
"queries": [
"query": "select * from $SYSTEM.TMSCHEMA_PARTITIONS"
],
"serializerSettings": {
"includeNulls": false
},
"impersonatedUserName": null
}
using that format, I can send a query, however I can't get a TMSCHEMA_PARTITIONS, Now I'm getting
HI tech49,
As the document mentions, current this API only support to send Dax query and T-SQL query should not be suitable for this API usages:
Executes Data Analysis Expressions (DAX) queries against the provided dataset. The dataset must reside in My workspace or another workspace.
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Data Analysis Expressions (DAX) Reference - DAX | Microsoft Learn
Regards,
Xiaoxin Sheng