Expression error when trying to use TEXT.SELECT

abaker77

New Member
Joined
Oct 11, 2011
Messages
18
Office Version
  1. 365
Using Power Query, I have a column of numbers for most rows, but some rows contain text characters along with the number itself; I'm trying to remove those characters to leave just the numbers.
I create a custom column and used the TEXT.SELECT statement but got the error.
Screen print is attached.
kill2.jpg

Any help is greatly appreciated.
Thank you !
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Your Sales amt column data type in the image is any, see the ABC123 icon (not text ABC). PQ is interpreting the numbers in that any type column as type number (right aligned) and Text.Select requires data type text. If you want to keep the any type you would need to do something like:

Power Query:
= Text.Select(Text.From([Sales amt], {"0".."9"})

But since you probably want the output as number, wrap that in Number.From

Power Query:
= Number.From(Text.Select(Text.From([Sales amt], {"0".."9"}))
 
Upvote 0
Solution
You're RIGHT - the data type was the problem. Your solution is great - THANK YOU SO MUCH.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

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