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

 

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
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Top Kudoed Authors
Users Online
Currently online: 265 members 2,610 guests
Please welcome our newest community members: