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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
huntergather
New Member

Refresh works in Desktop but not in Service

I have a simple dataset which works perfectly in Desktop, but scheduled refresh fails in Service with the following error:

 

"Microsoft SQL: Incorrect syntax near the keyword 'as'. Table: TestTable."

 

The Power Query M query for TestTable has been generated by Power BI Desktop and has no keyword 'as'. The same table can be refreshed just fine in Service in another report with a similar query.

 

How can I debug this?

2 REPLIES 2
Anonymous
Not applicable

Something else to consider is what version of Power BI Desktop you are using. Are you using a much older version?  Try updating your Power BI to the latest version and troubleshooting from there.  The reason i suggest this is the Mashup engine is frequently changed thus you could potentially see a difference in your desktop refreshes compared to the service.

Anonymous
Not applicable

Hi @huntergather,

 

Maybe you can take a look at below link about the incorrect syntax issue first:

Incorrect syntax in Power BI - but query works fine in SSMS?

 

Can you please share more detail information to help us clarify your issues?(e.g. screenshots, detail query formula, sql statement formulas)

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.