Power Query adds new column to original table after editing a column

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I have the table below, it has 4 columns: Item, Jan, Feb, Mar
I merged 2 columns in Power Query editor then loaded it to the sheet. The I edited the power Query and Column Jan label from Jan to Hello, then loaded
the table back to excel., What PQ did, added Jan2 to the original table? and it is an empty column! Why is that? Thank you very much

Book1
ABCDE
1ItemJanJan2FebMar
2item1111
3item2111
4item3111
5item4111
6
7ItemHelloMerged
8item1111
9item2111
10item3111
11item4111
12
13
Sheet1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You're saying that Power Query altered the source table?
 
Upvote 0
I know your problem. First you upload your table to Excel, result is:
1626784116197.png


Then you changed column name "B" to "CC" in power query editor and load the table to Excel, you see there is an empty column added after column "B" in the source table:
1626784262715.png


I record the screen and it shows when you refresh, the result table expand itself and then delete a temporary column in the table. however, an empty column was added in the worksheet.
1626785132992.png
 
Upvote 0
I know your problem. First you upload your table to Excel, result is:
View attachment 43118

Then you changed column name "B" to "CC" in power query editor and load the table to Excel, you see there is an empty column added after column "B" in the source table:
View attachment 43119

I record the screen and it shows when you refresh, the result table expand itself and then delete a temporary column in the table. however, an empty column was added in the worksheet.
View attachment 43122


Yes that is what happend to me. Why that is happening. Now as you suggested, I refereshed the Query and to my surprised it added another empty columns to both the original table and to the table that power query created. Another refesh and adding another columns to both.. why is that? and how to avoid that? Thank you again
 
Upvote 0
Yes that is what happend to me. Why that is happening. Now as you suggested, I refereshed the Query and to my surprised it added another empty columns to both the original table and to the table that power query created. Another refesh and adding another columns to both.. why is that? and how to avoid that? Thank you again
Upload the result table to G1 or other unused column or a new worksheet.
 
Upvote 0
It's generally not a good idea to stack tables underneath each other on the same sheet anyway. I suspect you have the 'Preserve column sort/filter/layout option' checked?
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top