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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
davidz106
Helper III
Helper III

Define folder path with wild card

I want to query multiple files from a folder "results" for each "projectname". Each project name contains a vast number of files and folders besides "results".

 

C:\1\projectname\results\

 

How to tell PBI that I am only interested in "results "folder for each "projectname"? Projectname is a wildcard here for me. 

 

I know how to pull all the files from all projectname "folders" and then filter it but that makes everthing really slow. Is it possible to set up something like auto indexing? Which tool would be better suited for this job than PBI?

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

- use a "contains"  filter on the file path column, set it to \results".  Note that Power Query is case sensitive.

- accessing content from your local C drive is sub-optimal. It will only work for your Power BI Desktop, it will not work on the service.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @davidz106 ,

Here are the steps you can follow:

1. Connect your folders using Power BI Desktop.

vyangliumsft_0-1659343200503.png

2. Click Transform Data to enter Power Query.

vyangliumsft_1-1659343200505.png

 

3. Click Add Column – Custom Column – enter the following code.

Text.Contains([Folder Path],"results")

vyangliumsft_2-1659343200506.png

4. Select the newly formed column - select True.

vyangliumsft_3-1659343200507.png

5. Result:

The rest are data with "results".

vyangliumsft_4-1659343200509.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

lbendlin
Super User
Super User

- use a "contains"  filter on the file path column, set it to \results".  Note that Power Query is case sensitive.

- accessing content from your local C drive is sub-optimal. It will only work for your Power BI Desktop, it will not work on the service.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors