Forum Discussion
weiyu_chen
5 years agoFrequent Visitor
What is the escape char for rest api execute queries in postman
POST Body: { "queries": [ {"query": "EVALUATE COUNTAX(FILTER('Activity',[Activity Status]=\"Completed\"), [Priority])" } ], "serializerSettings": { "includeNulls": true } } Got this err...
- Anonymous4 years ago
Hi weiyu_chen ,
I checked some of the relevant restrictions and it seems that none of them are touched on your side...
- Only 1 DAX query can be executed per REST API request.
- Each DAX query can have only 1 result set.
- Result sets are capped at 100k rows.
- Supported data types: string, numeric, boolean, blank, datetime and variant. Binary is not supported.
- Azure AS and SSAS do not support this DAX REST API.
Is it possible that the error is reported because this DAX Query returned a single value, but the required return result here is a table? Change the DAX Query to the following form and see if it works:
{ "query": "EVALUATE SUMMARIZE ( 'Activity', \"countofpriority\", COUNTAX ( FILTER ( 'Activity', [Activity Status] = \"Completed\" ), [Priority] ) )" }Best Regards
weiyu_chen
4 years agoFrequent Visitor
Thanks for the reply. I have tried your suggestion, get the following error:
{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "After parsing a value an unexpected character was encountered: \". Path 'queries[0].query', line 3, position 69.",
"target": "request.queries[0].query"
},
{
"message": "'request' is a required parameter",
"target": "request"
}
]
}
}
The query body is:
{
"queries": [
{"query": "EVALUATE COUNTAX(FILTER('Activity',[Activity Status]=""Completed""), [Priority])"
}
],
"serializerSettings": {
"includeNulls": true
}
}
Thanks!