cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Spudduk
Frequent Visitor

Data Import and File Name Wild Cards

Question to the great and the good

 

After a way to import a file in from a server location so that is always pull in the same file name in the example below Categories.

 

The reason being in the future changes maybe added by putting the date and time stamp at the end of the file name and I want to future proof it.


Source = Excel.Workbook(File.Contents("\\srv-w002\O\O\Reporting\Categories.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],

Thanks

 

Andy

3 REPLIES 3
Spudduk
Frequent Visitor

Thanks... what if there are multiple files in that folder location ? @amitchandak 

Hi @Spudduk ,

 

You can refer this article, connect to a folder if there are multiple files, it works well. After connecting the folder, Returns a table containing a row for each file found in the folder path and all its subfolders. Each row contains properties of the file and a link to its content. 

vchenwuzmsft_0-1643684737627.png

 

Then as @amitchandak said, filter the table by date.

 

Refer:

Combine files behavior 

 

 

 

amitchandak
Super User
Super User

@Spudduk , if that is the only file in the folder or the file name will be like Categories*, then add as a folder, filter contains Categories and then expand

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors