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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to connect Power BI with SQL query with Direct import query wherein it works fine in SQL and power editor but after proceeding with "Load" the below error occurs. I am looking for the solution for past 2 weeks. Can anyone assist me.
Error :
Microsoft SQL: Incorrect syntax near the keyword 'with'. Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. Incorrect syntax near ')'.
Hello @Revathi_Kannan ,
This is a MS SQL Server error message.
Start the WITh SQL statement (Common Table Expression) by adding a semicolon before it:
like below:
;WITH
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 161 | |
| 132 | |
| 117 | |
| 79 | |
| 53 |