Power Query M code
let
Source = YourTable,
DigitsOnly = Table.TransformColumns(Source, {{"ColumnName", each Text.Select(_, {"0".."9"}), type text}})
in
DigitsOnly
Removes every non-numeric character from a text column, leaving only the digits.
let
Source = YourTable,
DigitsOnly = Table.TransformColumns(Source, {{"ColumnName", each Text.Select(_, {"0".."9"}), type text}})
in
DigitsOnly
Useful for cleaning phone numbers or codes mixed with formatting characters before converting to a number.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Extract Digits Only from Text.