Forum Discussion

nleuck's avatar
nleuck
Icon for Post Patron rankPost Patron
9 years ago

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

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft 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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nleuck,

     

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

    Call an SP

     

    Regards,

    Xiaoxin Sheng