Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to replace dot in decimal numbers to comma (not thousand separator!)

Please, in your answer, don't mention "thousand separator" or "regional settings".

 

How can I replace dot in all decimal numbers to comma as a mass replacement in a column? The column is already "decimal number" type but some of the numbers come with dot from the SQL and the column doesn't recognize them as numbers and they are then "text". This produces errors.

 

Thanks in advance.

  • Hi Anonymous ,

     

    You may get the result you want by using the "substitute" function.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    If you are using the "directquery" connection mode, you could only modify the data at the data source.

    If you are using the "import" connection mode, you could modify the data in edit queries.

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      V-lianl-msft with replace values we can replace only numbers not (.)  any other alternative?

      • PaulDBrown's avatar
        PaulDBrown
        Icon for Community Champion rankCommunity Champion

        Anonymous 

         

        You can use "Replace Values" in Power Query to change any character (or strings, spaces...), even into  "blank" to remove it if you so wish (leave the "Replace with" box empty to remove the character). Just make sure the column is formatted as text.

        Here is an example changing from " . " to ","

         

         

         

         

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    You can achieve this in Power Query using the "Replace values" function under the "Home" tab