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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
AliPoTD
Advocate II
Advocate II

Power Query Combine files containing different Date column headers

Hello all,

 

Please can I ask for your help with an issue I am having combining files in Power Query.

 

I have several Excel files which have a number of columns with a date as the header.

Each day, another Excel file is received with the same layout except that it will have replaced a Date column with a new date column containing a different date.

 

When I try to combine them in Power Query, I edit one of the files in the folder in the "Transform Sample File", but when this is then used to merge the multiple files in the main query, I receive an error stating that it is missing a particular Date column. 

For Example:

File 1 Column Headers

SourceCustomer15/05/202416/05/2024

File 2 Column Headers

SourceCustomer16/05/202417/05/2024

 

If i use e.g File 1 as the Sample file, i then get an error stating that it can't find column "15/05/2024". This will occur with any of the files as they all differ slightly in which dates they show.

 

What I need is for the end result to be e.g.

SourceCustomer15/05/202416/05/202417/05/2024

 

I'm guessing I need to utilise a List in some way, but I'm not sure of how to do this.

Any advice greatly appreciated, many thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

Thanks for the solution @HotChilli  provided and i want to offer some more information for user to refer to.

hello @AliPoTD , based on your description, you can refer to the following solution.

in power query, after combing the file, click the invoke custom function step and remove the steps below it.

vxinruzhumsft_0-1716358160509.png

Then select transform file column, and select remove other columns

vxinruzhumsft_2-1716358334063.png

 

Then expand the column.

vxinruzhumsft_3-1716358363161.png

 

Output

vxinruzhumsft_4-1716358375225.png

 

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,

Thanks for the solution @HotChilli  provided and i want to offer some more information for user to refer to.

hello @AliPoTD , based on your description, you can refer to the following solution.

in power query, after combing the file, click the invoke custom function step and remove the steps below it.

vxinruzhumsft_0-1716358160509.png

Then select transform file column, and select remove other columns

vxinruzhumsft_2-1716358334063.png

 

Then expand the column.

vxinruzhumsft_3-1716358363161.png

 

Output

vxinruzhumsft_4-1716358375225.png

 

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HotChilli
Super User
Super User

It looks like it would be better to Unpivot the date columns in the sample file.  That will prevent loading errors and you can do any transforms required from a common base.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors