Forum Discussion

chotu27's avatar
chotu27
Post Patron
7 years ago
Solved

Execute SQL Server stored procedure input parameters with power bi parameters

Hi All,   I have stored procedure in SQL Server which i need to bring the data in to Power BI. For that i have to pass two parameters which i wanted to pass with parameters defined in Power BI.   ...
  • LivioLanzo's avatar
    7 years ago

    Hi chotu27 

     

    this is actualy pretty easy, once you have set up both parameters, in my case named CustomerID and ShipperID, just run the query with this M code:

     

    =Sql.Database("server_name", "database_name", [Query="exec test_proc " & CustomerID & ", " & ShipperID])