I defined the power queris using the test database in powerBI desktop. I'd like change the data source to point to the production database. I used the way from 'File->Options and Settings -> Data Source Settings'. But I can only change the Credentials without being able to change it to a different database. Are there anyways we change the data source definition just like the one we used in Powerpivot inside Excel?
Thanks for the reply. I was able to change database connection individually using the way you described. I'm looking for a way to change the database connection for all the queries that use the same connection since we have so many queries defined. We used to deploy powerpivot Excel templates to our customers. Each user can change the database connection in one place and then start to use the template. we would like to deploy PowerBI desktop PBIX files in future. We need to have an efficient way to change the database connection for our customers.
I got his from some blog that I cannot remember now. To be able to change the source info for all of your queries, create a new query that returns the connection string and then use it in the Source declaration of the others. For example, if you have an Access database source, create a query call AccessFileAddress, like this:
let Source = "C:\MyFolder\MyDatabase.accdb" in Source
and then in all of your queries that need to connect to the database, use it like this:
let Source = Access.Database(File.Contents(AccessFileAddress))
Then when deploying you only need to change the definition of the AccessFileAddress query.
Connect with me in LinkedIn: https://pr.linkedin.com/in/adolfosocorro Follow me on Twitter: https://twitter.com/AdolfoSocorro
I'm also having issues with changing the datasource. When I change the datasource from my test enviroment to the production. powerbi desktop wants to apply the change before I can publish or save the PBIX file. Which offcourse sounds logical. But...
My test eviroment has 200MB of data containing a few thousend lines My production eviroment has 3,5 Gigs of data containing a few million lines.
I'm conneting to a ODATA source dynamics D365 entity which is exactly the same in both TEST and PRODUCTION
During my report building I'm not intrested at all in all the data of the production. How can i get around this issue ? Anyone?! Please!!!