Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All, I am trying to execute a query through the rest api documentation. Below is my sample json body. It is a simple Query which runs with no issues in desktop's DAX Query View but it is throwing error when called via API. I believe this is due to the use of "TableID" which is present inside double quotes. Please help me resolving this
Sample Body:
{
"queries": [
{
"query": "EVALUATE
var _a = SELECTCOLUMNS(INFO.TABLES(),"TableID", [ID])
var _b = SELECTCOLUMNS(INFO.TABLES(),"TableID", [ID])
Return UNION(_a,_b)"
}
],
"serializerSettings": {
"includeNulls": true
},
"impersonatedUserName": "someuser@mycompany.com"
}
--------------------------------------------------------------
Response:
{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "Invalid value",
"target": "request.queries[0].query"
},
{
"message": "'request' is a required parameter",
"target": "request"
}
]
}
}
Solved! Go to Solution.
You probably need to double the double quotes, or escape the quotes with \
have you tried it?
Thanks using "\" helped. But is there anyway to run the query without escaping the double quotes with "\" ?
You probably need to double the double quotes, or escape the quotes with \
have you tried it?
Can you please share the Library you have used?
Thanks using "\" helped. But is there anyway to run the query without escaping the double quotes with "\" ?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 11 | |
| 10 | |
| 9 | |
| 9 |
| User | Count |
|---|---|
| 59 | |
| 41 | |
| 36 | |
| 25 | |
| 25 |