Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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?
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
And make sure your two option "Enable load" and "Include in report refresh" are turned on.
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.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |