How to Change the data source in Power BI
Select Distinct
Business Analytics Simplified : Data Analytics, Business Intelligence, Management Accounting
(And keep all your existing visuals, calculated columns and measures working)
If you have been working with a static dataset in Power BI and you need to change it to become refreshable, this article outlines the steps and benefits of doing so
If you follow this carefully you will ensure that all of your existing visuals, calculated columns and measures will continue to work, making the change seamless
Always make a copy of your PBIX file before you start….just in case
At first glance there is no obvious way to change the data source
We will follow theses steps
Step 1 — add the new refreshable data source
Step 2 — Copy the connection details from the new source
You now have two data sources, the second one being your new refreshable connection
We will grab the details of this new connection
Right click and select edit query, then go to advanced editor
In the advanced editor
Copy the code from this entire block
领英推荐
Then close the advanced editor
Step 3 — Apply the connection details to the old data source
Still in the power Query Editor
Select the original dataset, and go into?its?advanced editor
In the Advanced Editor
Highlight all of the code
And paste the new code from the clipboard
Click ‘Done’, then Close and Apply
Step 4 — Now delete the second dataset
The original CSV dataset is now replaced with the SQL connected dataset
Any calculated fields will still work and all visuals which referred to the original dataset will still work
The Alternative
The alternative would be to add the new refreshable data set, then you would have to individually change every visual, calculated field and measure to refer to your new data set. This would be a lot of work and not without risk of error, as well as being very boring
For more Business Intelligence tips covering SQL, Power Bi and Excel follow, subscribe or follow our You Tube Channel