Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi. I'm a new Power Query user. I am dealing with loads of CSV and Excel files with loads of columns. I'd like to combine all of them in a single file that is more understandable and easier to work with. However, it seems that PQ combines the columns based on the order it shows up in each file rather than on the column name.
For example: File 1 has Name, Age, Grade listed columns 1, 2, 3 respectively. File 2, on the other hand, has Name, Grade, Score, Age, listed in columns 1,2,3,4. When I use PQ's From Folder option, the resulting table shows both Age and Grade values in column 2, Grade and Score values in column 3, and so on.
I have tried this with Excel and CSV with the same results. Interestingly, it seems to work with the Append function (values are grouped correctly [I only tried 2 files though] ) but, with hundreds of files to work with, using this function is counter-productive.
This a very big roadblock in my effort to consolidate gazillions of files at my workplace. I refuse to look for a single thing in multiple files again. So, please, please, PLEASE help me. Thanks!
Hi @iwriteae,
When using the Folder option in Power Query to combine data from multiple Excel files and CSV files, the tables in Excel files and CSV files should have same table structure (same columns headings, same number of columns in each file), this way, even if these columns are in different orders in each file, you are able to combine them into one single table. Also make sure that you create table for the data in each file.
In addition, for Power Query issues, please post the question in the Power Query forum at https://social.technet.microsoft.com/Forums/en-us/home?forum=powerquery to get dedicated support.
Thanks,
Lydia Zhang
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |