Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi
I have more than 100 excel files in a Folder which I would like to combine throug Power query. Most of the files have same number of columns (for example 8 columns) except few which have different number of columns (for example 10 columns, 15 columns ......). While combining the files, power query takes only 8 columns as it is found in most of the files and omits the additional columns found in other files.
How to overcome this. Your help is most appreciated. Thanks in advance
Hi @serpiva64
Thanks for your reply. Saw the video. I think the video talks about different column names. In my case, I don't have column names at all. But different number of columns in each file.
Hi,
you can use something that is in that video.
When you get your table with all the table of data
if you expand you hard code the names of columns
So next time you will not get columns if they increase.
Instead if you use Table.Combine you make it dynamic and all columns will be recovered
Click fx
obtain this
then modify it
= Table.Combine( #"Filtered Rows1"[Data])
and it's done
Is the expected result supposed to include the unknown columns? If they are unknown, how are you using them in your project? Or are you simply trying to combine the data from all files that contain the specific 8 columns and omit the other columns?
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
Hi @jennratten
Thanks for pitching in. Actually the excile files which I am referring are nothing but Sales Invoices generated in excel. It is a standard format with 8 columns being used. But sometimes the clerk uses additional columns for the reasons best known to him. So it happens that some files contain more than 8 columns.
I tried selecting the file with maximum columns as sample file while transforming and combining. It worked. But the problem for me to open all the files and see which file has max columns.
Hi,
You will find a brilliant solution in this video
by Goodly
If this post is useful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !
User | Count |
---|---|
20 | |
10 | |
10 | |
9 | |
7 |