Forum Discussion
Parameters in Direct Query
- 6 years agoHi 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..
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
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?
Thanks
Mohan Kumar
- GilbertQ6 years ago
Super User
Hi there
As far as I know parameters cannot be used with DirectQuery?- Anonymous6 years agoNot applicable
GilbertQ please see the below screenshot where i created report using direct query and for same report i am able to pass parameter in services.
- Anonymous6 years agoNot applicable
Hi Anonymous
Is the SQL Server On-Prem or Azure?
Are you using any gateways?
- Anonymous6 years agoNot applicable
Hi Anonymous i am not sure about trail pro License. Curruntly i am using pro license.
Step 1-Create a report in PBI desktop using latest version
step 2-In Get data-serverdetail-direct query-advance option -write plane sql query-done
step 3-Go to transform data-transform data-advance editor-change query with your paramter (dont use any filters)close and apply.
step 4- publish report.
Note-Desktop and services must use same user account.
please follow the below screenshot-