Understand how Power BI handles data file imports by linking to original sources rather than embedding them. Learn why maintaining consistent file locations and names is essential for ensuring seamless data refreshes.
Key Insights
- Power BI does not store imported data files like Excel or CSVs within reports; instead, it creates a link to the original file, which must be preserved to maintain data integrity.
- If an original data file is moved or renamed, Power BI will lose the connection, requiring users to manually update the file path through the Data Source Settings menu.
- This course demonstrates how to refresh linked data in Power BI, showing that changes in the source file are reflected in the visuals once a refresh is triggered.
This lesson is a preview from our Power BI Certification Course Online (includes software & exam). Enroll in this course for detailed lessons, live instructor support, and project-based training.
It's important to understand that the data that we're bringing into Power BI becomes a link. Data files that we bring in, the Excel files, the CSV files, are not embedded or stored in the Power BI reports that we create. They are stored as links, meaning the original files that are Excel files, CSV files, we need to keep those.
You can't just say, oh, I've added it into Power BI, and then go delete my original files. No, you've got to keep those data files because you're going to be updating those files, adding new records potentially, and then the Power BI report will be updated. We can refresh that data to pull in the new stuff.
We need to keep those files. Ideally, you keep them in the same place. You keep them with the same name because if you ever move or rename the file, then Power BI is going to lose its link because it links to it based on a file name in a certain location.
Now you can, of course, do that, but how does all of this work? So let's see. We brought in some original CSV file into this, but I might want to know, hey, what file am I linked to? Where is it? So I can go into transform data here, and I click on the bottom part. I don't click on the top part.
That'll take us into Power Query. We'll see that soon, but I'm going to click on the bottom part, the menu, and I'm going to choose data source settings. This is going to show me my data sources.
In this case, I only have one data source, and I can see where that's located. In my Dan desktop in class files day, Power BI class, this is linked to a file called regional sales. If I ever rename that file or if I move that file, I would need to come in here, hit change source, and then click browse and choose the new file name with its new location.
Now, because we're linked, if we ever want to update the data, we can simply come up here and hit refresh. I've actually made some changes to this CSV file since I last imported it. So watch these numbers here.
When I hit refresh, it's going to go to that linked file, pull in the latest data, and we now have refreshed values. So it goes in and updates all of the visuals based on the changes.