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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
iwriteae
New Member

power query

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!

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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