Forum Discussion
Parameters in Direct Query
Hello Team,
I want to change my local server to on premise server using dataset parameters. I have loaded data using direct query.
I could change my server with using parameter in import mode. I am trying to achieve same result with direct query but Power bi Service is not able to identify parameters when I use direct query. Please let me know how I can achieve this.
- Hi there
As far as I know there is nothing else at the moment unfortunately. - Anonymous6 years ago
Yes by using rest api you can update parametrs in direct query.
Step 1- Take direct query mode and in advance option write a normal query.
Step 2- Go to adavance editor and change that query with parameter.
like
let
Source = Sql.Database("host name", "database_name",
[Query="select * from [schema name].["& paramter 1 & "_retailername_"& paramter2 &"] (NOLOCK)"])
in
SourceIn the above example i chnage my direct query using parameter.
If you want to chnage thease parameters using powershell plz follow the following link-
If i answer your question marked as solved..
15 Replies
- GilbertQSuper UserHi there
Currently it is not possible to use parameters with DirectQuery
You can vote for the idea at https://ideas.powerbi.com- AnonymousNot applicable
is there any other workaround?
- GilbertQSuper UserHi there
As far as I know there is nothing else at the moment unfortunately.
- lbendlinSuper User
You can try to abuse the Deployment Pipeline parameterization for that. Direct Query is not listed in the limitations.
- AnonymousNot applicable
but, it requires premium capacity and my organization has pro license.
- AnonymousNot applicable
Bingoooo..
Got solution finaly...if you download latest version of power bi dekstop and publish the report.your parametrs are enable in services and you can make it dyanamic.
latest version link-https://www.microsoft.com/en-us/download/details.aspx?id=58494
version -2.82.5858.1161
- AnonymousNot applicable
Hi GilbertQ ,
Can we change Paramter values in direct query mode using PowerShell?- AnonymousNot applicable
Yes by using rest api you can update parametrs in direct query.
Step 1- Take direct query mode and in advance option write a normal query.
Step 2- Go to adavance editor and change that query with parameter.
like
let
Source = Sql.Database("host name", "database_name",
[Query="select * from [schema name].["& paramter 1 & "_retailername_"& paramter2 &"] (NOLOCK)"])
in
SourceIn the above example i chnage my direct query using parameter.
If you want to chnage thease parameters using powershell plz follow the following link-
If i answer your question marked as solved..
- AnonymousNot applicable
Anonymous I have tired this by downloading latest version 2.82.5858.1161 and published the report with direct query contains paramter but parameters are not showing up in power bi online(app.powerbi.com.) Could you please elobarate the steps furher if possible. Any references could be highly appreciated.
Just for your information, I am holding Trail Pro License. Is that really matters?
ThanksMohan Kumar
- GilbertQSuper UserHi there
As far as I know parameters cannot be used with DirectQuery?