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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Nick555
Helper I
Helper I

Importing File

Hopefully this is the right board. I've tried scouring the web and haven't found anything. It seems everything out there is about combining files and similar data sets.

 

Background:

I am trying to automate a refresh process for a Power BI dashboard. The data needs to be updated on a schedule. The data files are contained within a directory of hundreds of other files. The specific data I need will be automatically downloaded into this directory. The needed file will have the same name every download EXCEPT for the last 6 digits signifying the version of the file.

Problem:

Each time my process updates I need to grab the correct file based on name bearing in mind that the file name will be the same except for the last 6 digits of the file name. I also need to grab the most current version of the file, which I should be able to do based on create date. I don’t need to combine anything, I just need the correct file every month.

Any help is appreciated.

 

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

"Each time my process updates I need to grab the correct file based on name bearing in mind that the file name will be the same except for the last 6 digits of the file name. I also need to grab the most current version of the file, which I should be able to do based on create date."  Is there a conflict between these 2 requirements?

--

There are ways to customise and automate file loads from the same directory, for example, most recent file or most recent file with an identifiable pattern in the name.

If you can define a repeatable algorithm, then there will be a way to automate it.

For example

https://community.fabric.microsoft.com/t5/Power-Query/Parameter-with-a-variable-file-name/td-p/20432... 

 

or

https://www.youtube.com/watch?v=A2n5ApJZwL8 

View solution in original post

1 REPLY 1
HotChilli
Community Champion
Community Champion

"Each time my process updates I need to grab the correct file based on name bearing in mind that the file name will be the same except for the last 6 digits of the file name. I also need to grab the most current version of the file, which I should be able to do based on create date."  Is there a conflict between these 2 requirements?

--

There are ways to customise and automate file loads from the same directory, for example, most recent file or most recent file with an identifiable pattern in the name.

If you can define a repeatable algorithm, then there will be a way to automate it.

For example

https://community.fabric.microsoft.com/t5/Power-Query/Parameter-with-a-variable-file-name/td-p/20432... 

 

or

https://www.youtube.com/watch?v=A2n5ApJZwL8 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.