link query to latest file in folder

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
701
Office Version
  1. 365
Platform
  1. Windows
how do i direct the query to take source as latest file in the folder
files are updated once a month and worked on every day
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
you can try with
Power Query:
Table.SelectRows(Source, let latest = List.Max(Source[Date modified]) in each [Date modified] = latest)
or use any other column with dates that you think will be better for your needs
 
Upvote 0
basically these are the steps i took
is this correct?
get data
from folder
transfor
sorted by modified date descending
kept top row
expanded the binary
chose the table to modify

if this is the query then it will always tske the latest file?
 
Upvote 0
no, use From Folder feature then Edit and then on column [Date modified] use filter isLatest
after that you can do what you want

you asked about how to select latest file in folder not what to do with the data
 
Upvote 0
Solution
thanks that works perfectly
just 2 steps and i have the latest file
wow!
 
Upvote 0

Forum statistics

Threads
1,223,757
Messages
6,174,331
Members
452,555
Latest member
colc007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top