cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Firoj Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

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
SQLSource

 

This will Work 

 

 

 

Regards,

Firoj Shaikh

firojshaikh03@gmail.com

Firoj Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

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
SQLSource

 

 

 

This should work 

Regards,

Firoj Shaikh.

Firojshaikh03@gmail.com

Firoj Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

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
SQLSource

 

 

check 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 

firojshaikh03@gmail.com

 

jacasa Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

I receive this error after made your step to create a parameters

DataSource.Error: Microsoft SQL: Error converting data type varchar to date.
Details:
DataSourceKind=SQL
DataSourcePath=10.58.211.97,49461;PPL_KPI
Message=Error converting data type varchar to date.
Number=8114
Class=16

Any idea to fix this?

 

jacasa Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

I received this error mesage after run your steps with my own procedure

 

DataSource.Error: Microsoft SQL: Error converting data type varchar to date.
Details:
DataSourceKind=SQL
DataSourcePath=10.58.211.97,49461;PPL_KPI
Message=Error converting data type varchar to date.
Number=8114
Class=16

 

something Imade wrong?

 

let
SQLSource = (Param1 as date, Param2 as date) =>
let
Source = Sql.Database("10.58.211.97,49461", "PPL_KPI", [Query="EXEC [PPL_KPI].[dbo].[Completed_kpi]'"& Date.ToText(Param1) & "','" & Date.ToText(Param2)&"' #(lf)#(lf)#(lf) #(lf)"])
in
Source
in
SQLSource

 

Highlighted
jacasa Frequent Visitor
Frequent Visitor

Re: parameters to SP or Sql query

I received this error mesage after run your steps with my own procedure

 

DataSource.Error: Microsoft SQL: Error converting data type varchar to date.
Details:
DataSourceKind=SQL
DataSourcePath=10.58.211.97,49461;PPL_KPI
Message=Error converting data type varchar to date.
Number=8114
Class=16

 

something Imade wrong?

 

let
SQLSource = (Param1 as date, Param2 as date) =>
let
Source = Sql.Database("10.58.211.97,49461", "PPL_KPI", [Query="EXEC [PPL_KPI].[dbo].[Completed_kpi]'"& Date.ToText(Param1) & "','" & Date.ToText(Param2)&"' #(lf)#(lf)#(lf) #(lf)"])
in
Source
in
SQLSource

 

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (1,134)