Forum Discussion
Stored Procedures in Direct Query mode
Hi all,
Doing a migration project, in the legacy tool there are stored procedure with direct link to the DB, we need to replicate the same/exact process in PBI.
can we execute Stored Procedures in Direct Query mode, is that a limitation in PBI ?
if it is limitation, can you please let me know when this functionality/process restricted ?
Thank you,
Naresh
Hi, naresh202
Yes, you can execute stored procedures in Direct Query mode in Power BI. However, there are some limitations to this functionality. For example, you cannot use stored procedures that return multiple result sets, and you cannot use stored procedures that have output parameters.
Please refer to the following links in the hopes of helping you.
DirectQuery model guidance in Power BI Desktop - Power BI | Microsoft Learn
Use storage mode in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- IdrissshatilaSuper User
Hello naresh202 ,
try looking at this workaround here in this solution https://community.fabric.microsoft.com/t5/Desktop/Calling-SQL-stored-procedure-with-Direct-Query/td-p/224831
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
- v-zhangtiCommunity Support
Hi, naresh202
Yes, you can execute stored procedures in Direct Query mode in Power BI. However, there are some limitations to this functionality. For example, you cannot use stored procedures that return multiple result sets, and you cannot use stored procedures that have output parameters.
Please refer to the following links in the hopes of helping you.
DirectQuery model guidance in Power BI Desktop - Power BI | Microsoft Learn
Use storage mode in Power BI Desktop - Power BI | Microsoft Learn
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- naresh202Frequent Visitor
Hi, if you performed this kind of use case, can you please explain in more details.
because, when i try to execute a simple stored procedure in direct mode, i am getting below error.
Thanks, Naresh