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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors