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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nleuck
Post Patron
Post Patron

stored procedures

Is anyone able to explain how Power BI reads stored procedures from Sql Server? For instances it seems that if I connect to a table from Sql Server, Power BI is able to see that this is already a table and can easily connect to the data. On the other hand, when I try connecting to stored procedures, Power BI seems to struggle mapping it out. Are there different ways to write the code when you are trying to Import stored procedures? I'm currently using Microsoft Sql Server 2012, and I'm not sure if that is an issue until we update to Microsoft Sql Server 2016. Any help would be greatly appreciated.

 

Thanks

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @nleuck,

 

About use sp in power bi, you can refer to below thread:

Call an SP

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Phil_Seamark
Employee
Employee

Hi @nleuck,

 

Power BI Desktop works ok with Stored Procs,  You'll just need to take care you always return 1 dataset and never more than 1 dataset..

 

I think if your SP returns more than 1 result it ignores the additional procs.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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