Power BI: How to Connect Most Recent File from a Folder

In this Power BI Tutorial, we are going to explore, how to Connect Power Bi folder to get the most recent file. This is the scenario where I want Power Bi to pick the most recent file automatically once the connection is built in order to process the data and form the beautiful reports, dashboards.

So, for that first, we need to open the Microsoft Power BI desktop tool and in order to get data from a folder we need to click here Get Data down and I will choose more options and click the folder.

power bi connect to most recent file from folder
How to Connect Most Recent File from a Folder in Power BI
connect to most recent file from folder power bi
power bi connect to most recent file from folder

Now we need to set the path of our Folder and connect OK. Now let me share this structure for this data folder as you can see here, I have some files here and all have a similar name in it is updating on a regular basis. It is a simple CSV file with ProductName and Sales.

how to connect to most recent file from folder power bi
power query get latest file from folder
power bi connect to most recent report

Now we will Edit in the Query Editor to make data suitable for this requirement.

power bi connect to most recent dashboard
power bi connect to most recent file from folder

Now the first thing which we will do is the Date accessed here we will change the order to descending, now you’re seeing the most recently used file is coming on the top and we just want the signal file so for that we will just make this row limit to only one we want the one group with the most recently used files by selecting Keep Rows from Top ribbon.

connect to most recent report in power bi
power bi get latest file from folder
connect to most recent dashboard in power bi
connect to most recent dashboard in power bi

Now we need to select the content and choose, it will open one wizard, like shown below, and click OK.

how to connect to most recent dashboard in power bi
power bi get most recent file
how to connect to most recent report in power bi

Now we have done all the editing, which is required in the Query editor, now click close & apply

So, we are ready with the data and we’ll see how it looks so we will add some visuals like table and Pie chart by selecting Sales, ProductName.

steps to connect to most recent dashboard in power bi
power bi sharepoint folder data source

Now we will see how Power BI uses the most recent file so we will modify the file with some values and on the Save button.

steps to connect to most recent report in power bi

We just now only need to do one thing which is a refresh because power bi, we made the connection with filters.

Once refreshed we can see visuals are changing based on the values. So, we saw how easily get the most recent data when we are connecting to a folder.

microsoft power bi connect to most recent report
power query most recent file in folder

You may like the following Power BI tutorials:

In this tutorial, we learned how to connect to the most recent file from a folder in Microsoft Power BI.

  • How do I do this for the 5 most recent files? If I try do those these steps but only keep the top 5 rows, it only loads one of the Excel files.

  • >