This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I am trying to pass a query parameter to a store procedure and I can get it to work in Power Query but I am trying to let the user select the parameter (A Fixed Date - End of QTR)
Here is the call to the SP:
let
Source = Sql.Database("uih-sql1", "uihs_datawarehouse"),
Test = Value.NativeQuery(
Source,
"Power_BI_Get_NIRS_QTR @FiscalQTREnd",
[FiscalQtrEnd= NIRS_QTR ])
in
Test
I create a slicer to let the user select the date buth the data never updates...
I set the binding to the parmeter but the data never refreshes.
Thanks for any help... I'm missing something....
jim
I tried all of the above. It seems like the parameter is working in power query, if I change it there then the stored procedure updates and returns the data, the problem appears to be in the binding of the parameter to a field. I did that but nothing changes when I choose a specific value from the slicer containg the variable.
Hi,
Thanks for the solution TomMartens offered, and i want to offer some more information for user to refer to.
hello @jim_hubbardUIHS , based on your descriotion, you need to add'exec .....' in your code.
e.g
let
Source = Sql.Database("uih-sql1", "uihs_datawarehouse",[Query="EXEC Power_BI_Get_NIRS_QTR @FiscalQTREnd ="""& NIRS_QTR & """"]),
....
in
.....
And you can refer to the following link.
Power Query - Function to Execute an SQL Procedure - Hat Full of Data
Solved: Help Needed: Passing Dynamic Parameters to SQL Sto... - Microsoft Fabric Community
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @jim_hubbardUIHS ,
do you follow the steps here: https://community.fabric.microsoft.com/t5/Power-Query/Passing-PowerBI-Parameter-To-A-Stored-Procedur... and the linked post?
Keep in mind that this will only work for direct query models.
Regards,
Tom
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 25 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 29 | |
| 20 | |
| 19 |