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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee
Employee

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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors