I am trying to import data from sql server to power bi. The data are being generated by views and then the views are being called by sp in ordered to get the results. How can i call the store procedures from power bi in order to populate the report?
Asked
Active
Viewed 2,672 times
2
-
4Possible duplicate of [How to use SQL Server stored procedures in Microsoft PowerBI?](https://stackoverflow.com/questions/37589448/how-to-use-sql-server-stored-procedures-in-microsoft-powerbi) – slee423 Oct 04 '18 at 07:45
-
Power BI is a tool which expects data as tables or views. Stored procedures are much easier to create and edit in SQL server than in power BI. I would suggest you to store the data in views and export them in Power BI, or export the views directly if you already have them. – Trisa Biswas Oct 04 '18 at 09:39
1 Answers
1
When creating a data source from SQL Server, expand the Advanced options
and write a SQL Statement to execute your stored procedure such as:
EXEC [dbo].[usp_NameOfYourStoredProcedure]

C. Augusto Proiete
- 24,684
- 2
- 63
- 91