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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.