Forum Discussion
Update Data source server for all direct queries
Hi All,
I am using Power Bi connected to Data Explorer on direct query mode.
I need to distribute the Power Bi "template" to our customers and they will need to change the Data Explorer address in base of their server/credentials.
It look like that there is not an easy way to do it, which is a pain in the ass.
Up to now, I can do it doing:
- Edit query
- Change manually Source server address: AzureDataExplorer.Contents("https://xxxxxxxxuksouth.kusto.windows.net", null, null, [MaxRows=null, MaxSize=null, NoTruncate=null, AdditionalSetStatements=null]).
- Click Apply
I really do not like this mechanism since it deos not look scalable: this procedure has to be replicated for each query!!
Please let me know if there are better way to do it or workarounds on how to handle multiple queries scenarios.
Thanks in advance
Marco
- Anonymous4 years ago
I got the resolution for the powerbi support team:
- Using parameters for the data source. → Parameters - Power Query | Microsoft Docs
- Create a new parameter with the data you want to change, in this case, the ServerName
- Then in data query "Source" add the parameter replacing the generated string name as in below example
- Also remember you can create a parameter list for ease of use of the template
3 Replies
- amitchandakSuper User
Anonymous , Using the datsource setting option, try to change the connection details itself
- AnonymousNot applicable
- AnonymousNot applicable
I got the resolution for the powerbi support team:
- Using parameters for the data source. → Parameters - Power Query | Microsoft Docs
- Create a new parameter with the data you want to change, in this case, the ServerName
- Then in data query "Source" add the parameter replacing the generated string name as in below example
- Also remember you can create a parameter list for ease of use of the template