Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
nbufff
Helper I
Helper I

Token comma Expected Error

Hello all, I'm ftrustrated by token comma expected error with below code when I edit it in PBI query edit window, it shows no error when I tried it in Dataset Execute Queries REST API try page. Is there something wrong?

 

 

let

body="{"queries": [
{
"query": "EVALUATE SELECTCOLUMNS ('1#+SM+Missing+Region', '1#+SM+Missing+Region'[SKU])"
}
],
"serializerSettings": {
"includeNulls": true
},
}
",


Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/c04c4a4a-274f-4fd2-85cf-ab3138e7227e/datasets/4cd14ac0-b61...",[Headers=[Authorization="Bearer "&Token()],Content=Text.ToBinary(body)]))

in
Source

2 REPLIES 2
ERD
Community Champion
Community Champion

@nbufff , try to play with single quotation marks vs double quotation marks:

let
body="{'queries': [
{
'query': 'EVALUATE SELECTCOLUMNS ('1#+SM+Missing+Region', '1#+SM+Missing+Region'[SKU])'
}
],
'serializerSettings': {
'includeNulls': true
},
}
",
Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/groups/c04c4a4a-274f-4fd2-85cf-ab3138e7227e/datasets/4cd14ac0-b61...",[Headers=[Authorization="Bearer "&Token()],Content=Text.ToBinary(body)]))
in
Source

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

@ERD  thanks for advise. Actually, I tried with your advise.  But it called another error:

DataSource.Error: Web.Contents failed to get contents from 'https://api.powerbi.com/v1.0/myorg/groups/c04c4a4a-274f-4fd2-85cf-ab3138e7227e/datasets/4cd14ac0-b61...' (415): Unsupported Media Type

 

Is there anything I failed to add?

 

let
body="{'queries': [
{
'query': 'EVALUATE SELECTCOLUMNS ('1#+SM+Missing+Region', '1#+SM+Missing+Region'[SKU])'
}
],
'serializerSettings': {
'includeNulls': true
},
}
",
Source = Json.Document(
Web.Contents(
"https://api.powerbi.com/v1.0/myorg/groups/c04c4a4a-274f-4fd2-85cf-ab3138e7227e/datasets/4cd14ac0-b61...",
[
Headers=[Authorization="Bearer "&Token()],
Content=Text.ToBinary(body)

]
)
)
in
Source

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.