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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
G_Whit-UK
Helper II
Helper II

Looking for tips on using folder as data source

Hi

 

I'm looking for some tips on how best to efficiently use data stored in a folder as a data source.  At the moment, the model is inputing a number of CSV files (one per day) from a designated folder.  The CSV files are quite large and the Desktop version of Power Query appears to be struggling to cope with the volume of data.  I am therefore wondering how best to perform the intial steps within Power Query to maximise the efficiency.  I am wondering if it is a good idea to perform any bespoke steps within the "Transfer Sample File" - or would this make things worse?

 

Any useful tips on how the efficiently use data within a designated folder as a source would be approcated.

 

Thanks.

2 ACCEPTED SOLUTIONS
edhans
Community Champion
Community Champion

If you need all of the files in the folder, not much you can do. But if you only need some of the files, if the file names or other criteria, like the file date.

FOr example, in this M code, I am doing about 8-9 things where I filter for two files that begin with the letters M and P, get the latest of each, then combine (append) them into a single listing in Sharepoint, and then I hit the Combine button, where the red square is. That is where Power Query creates all of its custom steps for the combine operation. So hundreds of files, but only two get processed each refresh.

edhans_0-1603230408128.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Jimmy801
Community Champion
Community Champion

Hello @G_Whit-UK 

 

what I'm always doing is the following

- first only filter for files your really need

- create a function to read from your CSV-file (maybe already removing columns, filtering, etc.)

- apply this funciton on the files found in the folder as a new column

- combine the tables created in your new column

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

2 REPLIES 2
Jimmy801
Community Champion
Community Champion

Hello @G_Whit-UK 

 

what I'm always doing is the following

- first only filter for files your really need

- create a function to read from your CSV-file (maybe already removing columns, filtering, etc.)

- apply this funciton on the files found in the folder as a new column

- combine the tables created in your new column

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

edhans
Community Champion
Community Champion

If you need all of the files in the folder, not much you can do. But if you only need some of the files, if the file names or other criteria, like the file date.

FOr example, in this M code, I am doing about 8-9 things where I filter for two files that begin with the letters M and P, get the latest of each, then combine (append) them into a single listing in Sharepoint, and then I hit the Combine button, where the red square is. That is where Power Query creates all of its custom steps for the combine operation. So hundreds of files, but only two get processed each refresh.

edhans_0-1603230408128.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.