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
Turtledge
Regular Visitor

Error while combining and transforming excel files

Hi everyone,

I was trying to combine and transform multiple excel files which had names as: SalesTarget_2015, SalesTarget_2016, SalesTarget_2017, SalesTarget_2018. I wanted the result to look like this:

2022-11-14 (2).png

 

However, I was left with this:

 2022-11-14 (6).png

(It said there had been an error in the "Transform File" query that made the rows from SalesTarget_2016, 2017 and 2018 woulddn't show up)

And the "Transform File" code was like this:

 

let
Source = (Parameter1) => let
Source = Excel.Workbook(Parameter1, null, true),
SalesTarget_2015.csv_Sheet = Source{[Item="SalesTarget_2015.csv",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(SalesTarget_2015.csv_Sheet, [PromoteAllScalars=true])
in
#"Promoted Headers"
in
Source

 

Is there anyway I can change it to get my desired result? 

1 ACCEPTED SOLUTION
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Turtledge ,

 

You will need to check your source data. The load sequence is in order, which means the source data was loading up to the "SalesTarget_2015.xlsx", SalesPersonID 12, then encountered an error. It is likely the format is not aligned

 

Regards

KT

View solution in original post

2 REPLIES 2
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Turtledge ,

 

You will need to check your source data. The load sequence is in order, which means the source data was loading up to the "SalesTarget_2015.xlsx", SalesPersonID 12, then encountered an error. It is likely the format is not aligned

 

Regards

KT

Thank you for the advice. I checked the source data and change the files' sheet names, then it worked perfectly

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.