Removing duplicates

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,834
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am trying to remove duplicates using Power Query and have encountered a step which I don't know what it means.

I am using Excel 2019.

Step 1. Go to Data -> Get Data -> From File -> From Workbook

Step 2. Select workbook, click OK

Step 3. Select worksheet within the workbook, then select Transform

My data contains a mixture of numbers and text. At present the data type 123, (ie Whole number) so I click on the 123 and choose text.

I am presented with a message:

Code:
Change Column Type

The selected column has an existing type conversion. Would you like to replace the existing conversion, or preserve the existing conversion and add the new conversion as a separate step?

There are three buttons: Replace current, Add new step and cancel.

What does the message mean?

When I chose Add new step then remove dupicates and close and load, I got an error message:

Code:
[DataFormat.Error] We couldn't  convert to Number

What is wrong?

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
you just tested it = error

Power Query rule: column should have the same type of data not mixed
 
Upvote 0
Power Query rule: column should have the same type of data not mixed
if you add new step Power Query could be :confused: because first change data type is from automatic action based on a few data from the top - in your case you have there a few numbers probably so data type is 123
[DataFormat.Error] We couldn't convert to Number = PQ cannot convert text to number
 
Last edited:
Upvote 0
Power Query rule: column should have the same type of data not mixed
if you add new step Power Query could be :confused: because first change data type is from automatic action based on a few data from the top - in your case you have there a few numbers probably so data type is 123
[DataFormat.Error] We couldn't convert to Number = PQ cannot convert text to number
Thanks for the explanation.

My data has a few hundred thousand rows and the first hundred thousand are whole numbers but then the rest is a mixture of numbers and text.

So if I understand you correctly, the moment the data gets imported into Power Query because it looks at the first so many entries, it automatically (in my case) assumed they were all whole numbers?
 
Upvote 0
Correct
the best way is remove first Change data type added automatically then set each column type manualy (from practice :cool: )

but as I said: one column = one data type not mixed
 
Upvote 0
Correct
the best way is remove first Change data type added automatically then set each column type manualy (from practice :cool: )

but as I said: one column = one data type not mixed


Got it, thanks for your help.

BTW, I still prefer VBA to do this! It's 100% correct where I find PQ is sort of "try this, then this, then this" to educate PQ to spot patterns.
 
Upvote 0
so we are different, I am against vba in any form :)
for PQ you need IDEA first
 
Upvote 0

Forum statistics

Threads
1,215,492
Messages
6,125,115
Members
449,206
Latest member
burgsrus

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