Forum Discussion
Parameter not updating
I created a paramters startdate, enddate and intervention
added query1
let
SQLSource = (StartDate as date, EndDate as date, ParmIntervention as text) =>
let
Source = Sql.Database("scccdbdev", "velos",
[Query="EXEC usp_Rpt_ProtocolOpenAccrualsByMonthRevised
NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,
'"& Date.ToText(StartDate) & "','"& Date.ToText(EndDate) & "','"& ParmIntervention & "',NULL,NULL,
NULL"])
in
Source
in
SQLSource
invoked
let
Source = Query1(#date(2019, 1, 1), #date(2020, 1, 1), "All")
in
Source
but when i save and close and edit parameter
Its not filtering based on parameter.
Please let me know if i missed anything?
7 Replies
- lbendlinSuper User
What made you choose the "Query" option for suggested values ?
- AnonymousNot applicable
I thought this was the only option. Please let me know if there is any other option.
Thank you
- lbendlinSuper User
It's not a bad option but it's not the only one. There are many ways to do this in Power Query. You could use text parameters, or reference tables from other sources etc.
- mahoneypatMicrosoft Employee
The parameters are just placeholders that you populate at run time (when you execute the query). What are you trying to accomplish?
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- AnonymousNot applicable
I am trying to populate data at report visualization level. Since the query is complicated and its a stored procedure. Trying to see if i can pass the parameters dynamically
- DoryORegular Visitor
Maybe the Typo: Intervetion ?