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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
naresh202
Frequent Visitor

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 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community 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.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community 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.

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.

naresh202_0-1693374517216.png

 

 Thanks, Naresh

Idrissshatila
Super User
Super 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-...

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.