Forum Discussion
Pass a parameter from an Excel cell into a native SQL Query
Hello ArjanVos
You can add your parameter like this
let
Source = Odbc.Query("dsn=Extended", "Select#(lf) ib240.cdorder,#(lf) ib240.cdstatus#(lf)From#(lf) PUB.""ib-240"" ib240#(lf)Where#(lf) ib240.cdstatus = '" & MyParameter & "'")
in
Source
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hi Jimmy, almost a yea further now... Your solution seems to work only for parameters that I have defined within Power Quer but not for parameters that come from a cell value like in this link: https://exceleratorbi.com.au/pass-excel-parameter-power-query/
It then says this (in Dutch):
Freely translated: Query <Name> (step Source) refers to other queries or steps and therefore possibly doesn't have access to a data source. Make this data combination again.
Can we get this to work, so that we can make it as easy as possible for the end user to enter the parameters?