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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
wi11iamr
Advocate II
Advocate II

Append Query duplicates some columns

Hi there,

 

I have two identical tables (daya from FY2016 and FY2017) and am using an Append Query to merge them into a new combined table.

 

Using the Append Query function, there are 4 columns which are duplicated at the end of my new table. Having read up on this it's my understanding that this happens when the columns in the 2nd tabel have no match in the first table, and they are then added as new columns to the combined table.

 

Here's the kicker - I have checked (and triple checked) that the column names and data types are exactly the same. Of my ~40 columns, only these 4 give me a problem.

 

Any suggestions on where I could go and dig a little deeper to uncover my problem?

 

Thanks

William R.

 

1 ACCEPTED SOLUTION
wi11iamr
Advocate II
Advocate II

Oh my word...!!!

 

So, before I basj myself over the head, let me share my mistake with you...

 

The issue was quite definitely different column names - there were some trailing spaces in the names of the 4 columns in my 2nd table. I had however checked for this earlier, within Excel, using a pattern match to identify any spelling differences, howeve it appears that the Excel pattern match excluded trailing spaces, and thus did not alert me to the fact that the column names were in fact not the same.

 

Ah well, thanks for listening... 😉

View solution in original post

7 REPLIES 7
OobuJoobu
Frequent Visitor

An additional possbility which I've just discoverd (after seeing the solution here that lead me towards it), is that it might not always be leading or trailing spaces in Excel column names, but in my case it was a line break that had been added to a column header in excel, so that the 2nd word of the header was forced on to a 2nd line. I removed the line break and re-imported in to PowerBI and the copy of the column was no longer there.

hourir2
Advocate I
Advocate I

Thanks for this, helped me out!!

 

wi11iamr
Advocate II
Advocate II

Oh my word...!!!

 

So, before I basj myself over the head, let me share my mistake with you...

 

The issue was quite definitely different column names - there were some trailing spaces in the names of the 4 columns in my 2nd table. I had however checked for this earlier, within Excel, using a pattern match to identify any spelling differences, howeve it appears that the Excel pattern match excluded trailing spaces, and thus did not alert me to the fact that the column names were in fact not the same.

 

Ah well, thanks for listening... 😉

@wi11iamr 

Thank you, thank you, thank you for this solution.  I was wracking my brain trying to figure this out. Now I just need to come up with the best way to solve the problem 🙂

Thank you, your post saved me from giving up.  

Don't beat yourself up too badly. I'd been trying to figure this out for a few hours and your post put me on the road to a sloution. I have no idea where the extra spaces originate but the result is a rather annoying and time consuming piece of debugging. Thanks again. 

jpt1228
Responsive Resident
Responsive Resident

Thanks for this - I ran into the same thing and couldnt figure out why. The table had a space after the last letter of the column name. All fixed! 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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