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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Get data based on file name

I've searched the forum for a while now but can't seem to find a solution to my problem. 

 

What I'm trying to achieve is collecting data in to a master based on the file name. I have a huge folder containing thousands of excel files. I wanna extract data from specific files containing "project" in the file name. The files themselves are built with the same layout.

 

Hopefully this can be done. 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Using the Folder or SharePoint Folder connectors, you can get a list of all the files.  You can then Filter the file name column for text that contains "project".  In the query editor, click on the pull-down arrow on the right of the column header and select Text Filters/Contains ...  You could also filter first to a specific subfolder (if needed) by filtering that column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
itsmekamal
New Member

Further to the question posted by arduaj, my query is after i select a particular folder wherein there are 50 plus files containing data of each day's stock prices. I want to retrieve the contents of a particular day's file based on the date that i have entered in my excel sheet. I do not want to go to query editor everytime and change the date in the filter criteria.

 

Could you guide me with a solution please.

 

Thanks in advance.

Anonymous
Not applicable

Yes to some extent, although when I add a new file to the folder with the same layout it doesnt import it. It gives me an alert that a column is missing. What i did in the editor is that i removed some rows of each file to only keep the data i need.

That might be the problem?

mahoneypat
Microsoft Employee
Microsoft Employee

Using the Folder or SharePoint Folder connectors, you can get a list of all the files.  You can then Filter the file name column for text that contains "project".  In the query editor, click on the pull-down arrow on the right of the column header and select Text Filters/Contains ...  You could also filter first to a specific subfolder (if needed) by filtering that column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors