Forum Discussion

Pbix_is's avatar
Pbix_is
Icon for Advocate I rankAdvocate I
4 years ago
Solved

How do I determine if value in text type column contains only numbers

Hello! I have a column type text where some values are only numbers and start with many zeros 00000000000123. Other values are text only or are combination of text, characters and numbers; sample: ...
  • latimeria's avatar
    4 years ago

    Hi Pbix_is ,

    Try this:

    Table.AddColumn(Source, "Custom", each try Number.ToText(Number.From(Text.TrimStart([Column1],"0"))) otherwise  [Column1], type text)