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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.