Reputation: 4245
We have a web application which is installed on customer sites.
They get to choose the name of the web server and the port that it runs on.
The web application exposes some data via an OData endpoint.
The web application also serves some template Power BI files (.pbit)
At the moment, when the customers run the pbit files for the first time, the data refresh fails and they have to relink their data source.
We use data source referencing and store the location of the endpoint in a parameters table but it's still a pain for the customers to have to change this value, and, since we (the web application) know the endpoint URL, we'd like to be able to update the pbit file with the appropriate setting.
Ideally we'd like an API to be able to manipulate the pbit file, or maybe to be able to supply parameters to Power BI desktop, or even load the pbit file (which is a .zip file as I'm sure you know!), and alter the appropriate part within it.
Has anyone actually managed to do programatically or dynamically change a data source URI without needing manual intervention?
Thanks.
Upvotes: 0
Views: 954
Reputation: 15027
I would use the Query Parameters feature for this (more details in the link below). Note as of the July 2016 update, the source for parameters can now be another Query.
So I would build that "parameter allowed values" query by pointing at an Azure SQL instance or some other web-visible source that helps them choose the right value.
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-feature-summary/
Upvotes: 0