Forum Discussion
Temp Tables in Power BI with Direct Query
- 6 years ago
Hi Anonymous ,
Power BI Desktop has issues on parsing Queries in Direct Query mode. It always resolves the front end input SQL statement as a derived table so that stored procedure will cause syntax error.
For now, there are two ways to resolve it. One is changing the connection mode from Direct Query to Import. And the other is building most of data sets in SQL server using views etc and then direct connect to those.
Please reference the similar threads:
(It introduced the two ways in detail.)
(The user resolved it using a new function. But in this way, it may change to import mode. )
You could vote the idea up to get the requirement of using stored procedure with DQ mode implemented quickly.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33504791-direct-query
Hope this can help you.😊
Hi Anonymous ,
Power BI Desktop has issues on parsing Queries in Direct Query mode. It always resolves the front end input SQL statement as a derived table so that stored procedure will cause syntax error.
For now, there are two ways to resolve it. One is changing the connection mode from Direct Query to Import. And the other is building most of data sets in SQL server using views etc and then direct connect to those.
Please reference the similar threads:
(It introduced the two ways in detail.)
(The user resolved it using a new function. But in this way, it may change to import mode. )
You could vote the idea up to get the requirement of using stored procedure with DQ mode implemented quickly.
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/33504791-direct-query
Hope this can help you.😊
- michelsilva2 years agoFrequent Visitor
Thank you for the information.
I hope they resolve this soon because I'm trying to use the "Bind Parameters" functions (which only work with DirectQuery) in queries that use temporary tables.
https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters