Convert Currency Text to Number ($1,200.50) in Power Query M

Strips currency symbols and thousands separators from a text value before converting it to a proper number.

Data TypesIntermediatecurrencynumberconverttext

Power Query M code

let
    Source = YourTable,
    Cleaned = Table.TransformColumns(Source, {{"ColumnName", each Number.From(Text.Select(_, {"0".."9", "."})), type number}})
in
    Cleaned

Notes

This removes everything except digits and the decimal point; use Convert Parentheses to Negative Numbers first if negatives are shown as ($100).

Requirements

How to use this snippet

  1. In Power BI Desktop, choose Transform data to open Power Query, then open the Advanced Editor on a query (or start from a blank query).
  2. Paste the snippet and replace the placeholder names (tables, columns, file paths) with your own. Check the requirements above first.
  3. Run it through the Power Query M Formatter to tidy the layout.

Related Power Query M snippets

More Power Query M resources

Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Convert Currency Text to Number ($1,200.50).