What will happen if you import data from a particular location to the report, but the files have been moved away from that location accidentally. Then you will get an error saying that, the files are missing. Do not worry there is an easy way to overcome this by using Data Source Settings in Power BI.
This blog explains an easy method to fix this error.
First, I imported two excel files from my Desktop as follow.
![Imported Data files from Desktop](https://datatwist.wordpress.com/wp-content/uploads/2021/01/imported-data-files-from-desktop-1.png?w=1024)
Figure 1: Imported Data files from Desktop
Now I purposely move my files to a new folder in my D Drive.
![Moved csv files from Desktop to D drive](https://datatwist.wordpress.com/wp-content/uploads/2021/01/moved-csv-files-from-desktop-to-d-drive-1.png?w=1024)
Figure 2: Moved csv files from Desktop to D drive
Now I refresh my Power BI report as follow.
![Click on refresh](https://datatwist.wordpress.com/wp-content/uploads/2021/01/click-on-refresh.png?w=1024)
Figure 3: Click on refresh
I get the below message saying that I can’t refresh since the files are missing from its location.
![File Missing Error](https://datatwist.wordpress.com/wp-content/uploads/2021/01/file-missing-error.gif?w=1024)
Figure 4: File Missing Error
The error message is as follow.
![Error message for missing files](https://datatwist.wordpress.com/wp-content/uploads/2021/01/error-message-for-missing-files.png?w=625)
Figure 5: Error message for missing files
To overcome this issue, click on the down arrow of Transform data (in the Power BI ribbon), there you can find the Data Source Settings. Select the Data Source Settings option.
![Data Source Settings in Transform Data tab](https://datatwist.wordpress.com/wp-content/uploads/2021/01/data-source-settings-in-transform-data-tab.png?w=358)
Figure 6: Data Source Settings in Transform Data tab
Then the following window pops up containing the previous data source locations.
Now select one path and click on Change Source as follow.
![Previous data source locations](https://datatwist.wordpress.com/wp-content/uploads/2021/01/previous-data-source-locations.png?w=999)
Figure 7: Previous data source locations
Then browse the new file location as shown below.
![Click on browse](https://datatwist.wordpress.com/wp-content/uploads/2021/01/click-on-browse.png?w=874)
Figure 8: Click on browse
Select the file in the new location.
![Select the file in the new location](https://datatwist.wordpress.com/wp-content/uploads/2021/01/select-the-file-1.png?w=1003)
Figure 9: Select the file in the new location
Now you will be redirected to the previous window with the updated file location as follow. Click on OK.
![Updated source location](https://datatwist.wordpress.com/wp-content/uploads/2021/01/updated-source-location.png?w=874)
Figure 10: Updated source location
Now you can see the updated location in the Data Source Settings window.
![Updated source location in Data Source Settings](https://datatwist.wordpress.com/wp-content/uploads/2021/01/updated-source-location-in-data-source-settings.png?w=999)
Figure 11: Updated source location in Data Source Settings
Follow the same steps to other files as well.
After changing the location of other files, the final view of the Data Source Settings display as follow.
![Final view of the Data Source Settings](https://datatwist.wordpress.com/wp-content/uploads/2021/01/final-view-of-the-data-source-settings.png?w=999)
Figure 12: Final view of the Data Source Settings
Click on Apply Changes to apply the Data Source Changes to the Power BI Report.
![Click on Apply Changes](https://datatwist.wordpress.com/wp-content/uploads/2021/01/click-on-apply-changes.png?w=1024)
Figure 13: Click on Apply Changes
Now when you click on Refresh you do not get the error message. The data gets refreshed uninterruptedly.
![Refreshes without Error](https://datatwist.wordpress.com/wp-content/uploads/2021/01/refreshes-without-error.gif?w=1024)
Figure 14: Refreshes without Error
Please note that you can find the Data Source Settings in the Power Query Window as well.
![Data Source Settings in Power Query Window](https://datatwist.wordpress.com/wp-content/uploads/2021/01/data-source-settings-in-power-query-window.png?w=1024)