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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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?
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.
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.