Forum Discussion

RobbeVL's avatar
RobbeVL
Impactful Individual
8 years ago
Solved

replacing values

This formula should be replacing my "." to a "," right? (to convert text into decimal number) Why is this not happening? Can to find an explenation.     = Table.ReplaceValue(#"Replaced Value2","....
  • MarcelBeug's avatar
    MarcelBeug
    8 years ago

    Power Query has nothing like implicit type conversion, so if you want to convert text to numbers, then you need to change type.

     

    If your number format differs from the format in the text, then you can change the type and choose Using Locale..

    Next supply the culture code that conforms to your input format, i.c. e.g. English (United States).

     

     

    Generated code (step 2 is the result from the pictures above):

     

    let
        Source = #table(type table[price total = text],{{"15.02"},{"15.02"},{"5.97"},{"5.97"}}),
        #"Changed Type with Locale" = Table.TransformColumnTypes(Source, {{"price total", type number}}, "en-US")
    in
        #"Changed Type with Locale"