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
SFerro
New Member

Embed a button on Power BI desktop application to execute stored procedure

In our Power BI report we are using a table/view which is refreshed by a stored procedure. Inorder to update data, user need to execute stored procedure manually and then load the report.

Is it possible to integrate button (or any other control) in Power BI desktop application and execute the stored procedure on click of that button?

OR

Is there any other possible way to execute the stored procedure from power bi desktop application?

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@SFerro wrote:

In our Power BI report we are using a table/view which is refreshed by a stored procedure. Inorder to update data, user need to execute stored procedure manually and then load the report.

Is it possible to integrate button (or any other control) in Power BI desktop application and execute the stored procedure on click of that button?

OR

Is there any other possible way to execute the stored procedure from power bi desktop application?


@SFerro

Power BI only cares the table/view connected in your case. As to updating work on the table/view with a stored procedure or any other approaches, in my opinion, it is out of the scope of Power BI.

 

Technically you can call the stored procedure before getting data from a table by specifying certain SQL statements when getting data in Import Mode. The downside would be, if the updating stored procedure running for long, then you just get forever spinning when refreshing data.

Capture.PNG

 

So I'd suggest you schdule an external SQL agent Job to run the stored procedure in certain interval(5,10 minutes or whatever fit for your bussiness) to update the connected table. In Power BI, just connect to that table, no more updating work.

Capture.PNG

View solution in original post

1 REPLY 1
Eric_Zhang
Employee
Employee


@SFerro wrote:

In our Power BI report we are using a table/view which is refreshed by a stored procedure. Inorder to update data, user need to execute stored procedure manually and then load the report.

Is it possible to integrate button (or any other control) in Power BI desktop application and execute the stored procedure on click of that button?

OR

Is there any other possible way to execute the stored procedure from power bi desktop application?


@SFerro

Power BI only cares the table/view connected in your case. As to updating work on the table/view with a stored procedure or any other approaches, in my opinion, it is out of the scope of Power BI.

 

Technically you can call the stored procedure before getting data from a table by specifying certain SQL statements when getting data in Import Mode. The downside would be, if the updating stored procedure running for long, then you just get forever spinning when refreshing data.

Capture.PNG

 

So I'd suggest you schdule an external SQL agent Job to run the stored procedure in certain interval(5,10 minutes or whatever fit for your bussiness) to update the connected table. In Power BI, just connect to that table, no more updating work.

Capture.PNG

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.