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
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

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft 

 

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!

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.