From the course: Excel: Working Together with Power Query and Power Pivot

Scenario 4: New source data

- [Instructor] Earlier in this chapter, we discussed the process for refreshing source data but we didn't actually have any new data in our CSV file. So how about we work through a real world scenario where the data has changed? Just make sure that you have 04_04 NewData open to follow along with me. Okay. If we now jump into File Explorer, specifically the exercise file pack that you downloaded earlier, you'll notice that there's a second CSV file called EV sales (King county) Chapter 4. This file contains approximately three years more data than the original file that we've been working with throughout this course hence why the file size is so much larger. In order for our model to point to this new data set, there's a couple of options but by far the easiest way is to go ahead and delete the original CSV file which is at the very bottom of the list here. And then let's edit the file name of the updated CSV file to remove the text at the end of the file that says Chapter 4. And let's make sure we get rid of the space after the brackets too. Next, let's go ahead and jump back to the Excel file. And from the data menu here, click on Queries and Connections, and you'll notice that a pane opens to the right hand side of the screen. From here, all we need to do is click on the refresh icon to the right hand side of the CSV file source. And as you do, go ahead and watch the number of rows loaded change. Excel is now importing the latest data from the CSV file. And be patient here as this process might take a few moments. And there you have it. You'll notice that the number of rows jumped from roughly 156,000 to over 340,000. Great work. You've just updated the source data.

Contents