Failed to convert value '(137.790)' from type string to type floating point

Any idea how to fix this error? It seems that my columns are a floating point, so not sure what the fix needs to be.

Best Answer

  • ArborRose
    ArborRose Coach
    Answer ✓

    You could use string functions to remove unwanted characters with formulas like

    CAST(REPLACE(REPLACE(`YourColumn`, '(', ''), ')', '') AS DECIMAL)

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

Answers

  • @kim_barragan0126 It looks like the parenthesis around the value are preventing it from converting to a floating decimal. You will have to remove those characters before converting the datatype using a formula. Do you know if the parenthesis represent a negative number, like in an accounting format?

  • Yes, it represents a negative number. Would the below fix this in the magic etl?

    Using a string operation.

  • @kim_barragan0126 Yes, that would work!

  • ArborRose
    ArborRose Coach
    Answer ✓

    You could use string functions to remove unwanted characters with formulas like

    CAST(REPLACE(REPLACE(`YourColumn`, '(', ''), ')', '') AS DECIMAL)

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **