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.
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.
Now we will Edit in the Query Editor to make data suitable for this requirement.
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.
Now we need to select the content and choose, it will open one wizard, like shown below, and click OK.
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.
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.
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.
You may like the following Power BI tutorials:
- Publish to Web Power BI Error: Contact Your Admin to Enable Embed Code Creation
- How to combine multiple files from SharePoint folder in Power BI
- Power BI DAX Logical functions
- Power BI MAX and MIN function with Examples
- Power BI DAX SUM and SUMX function
- Power bi measure examples
- Power bi measure count with filter
In this tutorial, we learned how to connect to the most recent file from a folder in Microsoft Power BI.
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com
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.