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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
spms_MF
Frequent Visitor

Power Query - Execute SQL Stored Procedure - Changes cannot be applied

Hello,

 

I have tried and successfully implemented two queries to execute a stored procedure from Power Query. I used the following code:

 

Execute Stored Procedure:

let

   Source = "EXEC >name of the stored procedure<"

in

   Source

 

Run Execute:

let

   Source = Sql.Database(">server name<", ">database name<"),

   EXEC = Value.NativeQuery(Source, # "Execute Stored Procedure")

in

   EXEC

 

Everything works fine, the stored procedure runs successfully (albeit twice? - I don't know why).

 

When I close Power Query though, the program asks whether to apply or discard changes.
Applying the changes just makes it execute again without actually saving the changes to the query.

 

What am I doing wrong?


Thank you for your help!

 

PS. I should mention that I am running Version 2.102.845.0 from February 2022. Could that have an impact?

1 REPLY 1
Anonymous
Not applicable

Hi @spms_MF ,

 

You can indeed try to the latest version to see if the problem persists.

Or maybe you turned off this background refresh option?

Disable Power Query background refresh - Power BI | Microsoft Learn

vstephenmsft_0-1668071183393.png

And make sure your two option "Enable load" and "Include in report refresh" are turned on.

vstephenmsft_1-1668071424392.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.