Forum Discussion
Combine multiple files in Power query editor
I am able to connect to the folder and grab all the files, my problem is to clean the files and grab only necessary rows from each file, and combine them in a single file. Not sure, if we need to write a function for same in M-query. But I am trying to do some data cleaning before combining all the files.
- littlemojopuppy4 years ago
Community Champion
amikm you should be able to execute those steps in the Power Query editor. Each step will be applied to all the data. You shouldn't have any problems
- amikm4 years ago
Helper V
The steps defined in that article do not solve my issue, it is straightforward to get data from the folder, but they are not talking about how to clean this up and take a header from the only first file .
Select Data > Get Data > From File > From Folder. The Browse dialog box appears.
Locate the folder containing the files you want to combine.
A list of the files in the folder appears in the <Folder path> dialog box. Verify that all the files you want are listed.
Select one of the commands at the bottom of the dialog box, for example Combine > Combine & Load. There are additional commands discussed in the section About all those commands.
If you select any Combine command, The Combine Files dialog box appears. To change file settings, select each file from the Sample File box, set the File Origin, Delimiter, and Data Type Detection as desired. You can also select or clear the Skip files with errors checkbox at the bottom of the dialog box.
Select OK.
These steps are not helping much
- littlemojopuppy4 years ago
Community Champion
amikm the real issue seems to be you don't understand how to use Power Query to clean your data...
https://docs.microsoft.com/en-us/learn/modules/automate-data-cleaning-power-query/
https://docs.microsoft.com/en-us/learn/modules/clean-data-power-bi/