Forum Discussion
Syndicate_Admin
4 years agoAdministrator
Text by number
Hello
I have a text column, in which there are numbers and text.
I would like to create another column or measure, in which you convert the numbers (which are now text) to "number", and ignore the rows of text
With VALUE it doesn't work for me
Thanks a lot
| Column (text) | Column 2 (Number) |
| 2019 | 2019 |
| 2020 | 2020 |
| XCXC |
- Column = IF(ISERROR(VALUE([Column (text)])),BLANK(),VALUE([Column (text)]))
2 Replies
- Greg_DecklerCommunity ChampionColumn = IF(ISERROR(VALUE([Column (text)])),BLANK(),VALUE([Column (text)]))
- Greg_DecklerCommunity Champion
Syndicate_Admin Here is a Power Query solution as well:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtFSK1QExjAzAjAjnCGel2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Column (text)" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column (text)", Int64.Type}}), #"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Column (text)", null}}) in #"Replaced Errors"