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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
D3K
Advocate II
Advocate II

Bulk files upload from the folder

Hello everyone!

 

Got the question about uploading data into the system.

I have the one folder in sharepoint with sales, stocks, etc. And when I use the filter in power query to upload only neccesary files from this folder, I use the standard filter interface, where note to upload files, which name contains "stocks"". It shows me files, which contains "Stocks" and "Select all" option. File names also contains the period. But, when new file is added, power query doesn't add it to the filtered earlier list, even if it's name contains "Stocks".

 

So what I need to write in Query Editor to let it get all files with specified names, even the new ones.

 

Will appreciate any help! Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @D3K ,

I'd like to suggest you replace accurate filter part with Text.Contains/Text.StartsWith function to check specific text string:

#1:
SelectRow= Table.SelectRows(Source, each [Folder Path]="https://xxxxxxxxxxxxx" and Text.Contains([Name],"Receipt"))

#2:
SelectRow= Table.SelectRows(Source, each [Folder Path]="https://xxxxxxxxxxxxx" and Text.StartsWith([Name],"Receipt"))

Text.Contains

Text.StartsWith

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @D3K ,

I'm not so clear for your scenario, can you please share more details information to help us clarify your requirement?

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Hi @Anonymous 

 

Yes, sure. Please, check the situation.

I have the folder with files: stocks, sales and receipts.

2019-09-12_18-57-51 (2).png

 

When I'm adding this folder as a source, I'm using the filter in Power Query in the next way.

2019-09-12_19-00-48 (3).png

 

In Query Editor it looks like:

2019-09-12_19-01-41 (2).png

 

So the question is which code do I need to record into Editor (or use another tools) to make the filter work dynamically: if new file with the text "receipt" in it's name is added - automatically add this file into list of needed files (only files with receipts)?

 

Thank you for your attention!

Anonymous
Not applicable

Hi @D3K ,

I'd like to suggest you replace accurate filter part with Text.Contains/Text.StartsWith function to check specific text string:

#1:
SelectRow= Table.SelectRows(Source, each [Folder Path]="https://xxxxxxxxxxxxx" and Text.Contains([Name],"Receipt"))

#2:
SelectRow= Table.SelectRows(Source, each [Folder Path]="https://xxxxxxxxxxxxx" and Text.StartsWith([Name],"Receipt"))

Text.Contains

Text.StartsWith

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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