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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
johnsiah91
Frequent Visitor

Temp Table using Direct Query

Hi,

 

I was able to bring in data to PBI Desktop using temp tables but I get an "Incorrect Syntax Error" now when I try it now. Did something change? 

 

I did a couple of test of my end:

1. I tried to use the SQL code (has temp tables) that is already in PBI Desktop and tried to import it and I am getting the error now.

2. I compared the old code and new code but did not see any differences.

 

p.s I am not allow to create a view or stored procedure due to a contract agreement with the data company.

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@johnsiah91 , Try if you can use a query with "with" clause.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

With statements give me the same error message. As of now, the only workaround I have is to put everything into a nested statement.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.