Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
wanttobeanalyst
New Member

how to get only the latest file out a folder

I have a simple question but I don’t have the solution….

 

Is it possible to get only the newest excelfile out of a folder?

For example, I have this 4 files in a folder.

Now I want tot pickup only the newest one.

Next week my colleague will put a new file in the folder.

When I refresh my PowerBI dashboard next week, I want only that file, PowerBI have to skip the older one.

 

Are there possibilities to do it this way?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@wanttobeanalyst 

choose Folder as a Data source

at the next step press Trasform Data

sort Desc by Date Modified field

execute Keep Top rows (leave 1 row)

expand the Content field

Снимок.PNG


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

@wanttobeanalyst 

choose Folder as a Data source

at the next step press Trasform Data

sort Desc by Date Modified field

execute Keep Top rows (leave 1 row)

expand the Content field

Снимок.PNG


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
DataVitalizer
Solution Sage
Solution Sage

Hi @wanttobeanalyst

You have to open the Power Query Editor and from the steps tab select the one where you have all columns related to your files such as Content, Source.Name and extension (it could be step number 4 or 5).

Go then to the Date Column and select as Date/Time Filters the option Is Latest, this will filter will always bring to your report the newest files uploded to your folder.

 

Does it work ? Mark it as a solution 

 
amitchandak
Super User
Super User

@wanttobeanalyst , Refer if this can help

https://www.youtube.com/watch?v=8H9xM741hBQ

https://medium.com/@wkrzywiec/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, this really helpfull!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.