Forum Discussion
parameters to SP or Sql query
- 10 years ago
Thank you so much. Will give this a go as soon as possible.
- 10 years ago
By the way, this work fine. Thanks so much. Now I need to find out how to update the parameters in PowerBI.com so that i can refresh the data as needed. Thanks again.
I have similar issue let me know if you find any solution
Yeh sorry, no solution found yet on text.totext, ended up coding around it unfortunately. good luck.
- AJTindall739 years agoAdvocate I
Hi Sven, just dont add the "Text.ToText" part. it's already text.
for example:
let SQLSource = (param1 as text, param2 as date) => let Source = Sql.Database("MyServer", "MyDatabase", [Query="exec [MyDatabase].[dbo].[myProc] '"& param1 & "','" & Date.ToText(param2)&"'"]) in Source in SQLSourceI hope this helps.
Alan
- SvenTexas9 years agoFrequent Visitor
Thank you Alan - can't believe I missed the obvious! Thank you for putting the response on, am sure it will help others out too.
- Anonymous8 years agoNot applicable
Guys, you dont need to use Text.ToText, It is required for only non text values.
for example: '"& VariableName & "'
- Anonymous8 years agoNot applicable
Guys, you dont need to use Text.ToText, It is required for only non text values.
for example: '"& VariableName & "'
- Firoj8 years agoNew Member
let
SQLSource = (param1 as text) =>
let
Source = Sql.Database("gx-zwesqld038.database.windows.net", "ITXTestInterikea2", [Query="EXEC [ITX].[ExcludedTransactionsReportByTransactionCount] '"& (param1) & "' #(lf)#(lf)"])
in
Source
in
SQLSourcecheck i tried this and it works
still looking out for way to pass invoked function as input . Slicer could be an option but it takes Stored values than random and it inputs as dropdown or list.
Regards,
Firoj