Forum Discussion
Can stored procedures with parameters be used in a Direct Query connection?
I've read several posts and seen a lot of Youtube-movies, but I'm still confused: Is it possible to get data from a SQL-server by using stored procedures with parameters in a Direct Query connection?
Would appreciate a clear answer, yes or no 😁
(If yes, a link to a working example would be nice too)
Regards,
John Martin
- Anonymous3 years ago
Hi jmkvalsund ,
No, it is not possible to directly use stored procedures with parameters in a Direct Query connection in Power BI.
In Direct Query mode, Power BI directly sends queries to the data source at runtime, without importing the data into the Power BI model. However, Direct Query mode has some limitations, and one of them is the inability to use stored procedures with parameters.
Direct Query mode supports simple SELECT statements, but stored procedures with parameters involve more complex logic and dynamic execution, which is not supported in this mode. Direct Query mode primarily focuses on real-time querying and analysis of large datasets.
2 Replies
- AnonymousNot applicable
Hi jmkvalsund ,
No, it is not possible to directly use stored procedures with parameters in a Direct Query connection in Power BI.
In Direct Query mode, Power BI directly sends queries to the data source at runtime, without importing the data into the Power BI model. However, Direct Query mode has some limitations, and one of them is the inability to use stored procedures with parameters.
Direct Query mode supports simple SELECT statements, but stored procedures with parameters involve more complex logic and dynamic execution, which is not supported in this mode. Direct Query mode primarily focuses on real-time querying and analysis of large datasets.
- jmkvalsund
Helper III
Thank you for a concise answer:-)
I was hoping I could, since I have some SP's delivering ready calculated datasets from a database.
Guess I'll have to redesign them in Power BI.
Thanks again!