Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Convert text with commas into value

Hi all,

 

My database has some numerical fields that come in text and some of them have commas, by the time to convert the text to a value, the comma disappear and my number become  "bigger". For example if I have 100,00 I will have 10000, I also attach a printscreen .

 

I hope that anyone can help me

 

Best Regards

 

 

  • Chihiro's avatar
    Chihiro
    7 years ago

    Oh, I guess I misunderstood. Then replace "," with "." instead of blank.

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    So, are you saying that the commas in your case are decimals? So that 100,00 should be 100.00?

    • Anonymous's avatar
      Anonymous
      Not applicable

      100,00 should be 100 and 99,85 should be 99,85 and not 9985 for example. The commas disappear at all

      • Chihiro's avatar
        Chihiro
        Solution Sage

        Oh, I guess I misunderstood. Then replace "," with "." instead of blank.

  • Chihiro's avatar
    Chihiro
    Solution Sage

    Hmm, I'd do this in Query Editor. Right click on the column and replace "," with blank. Then change data type to number.

  • PattemManohar's avatar
    PattemManohar
    Community Champion

    I hope you are looking to achieve this...

     

    Input

    I've splitted the Data field into two parts i.e before comma and after comma. Duplicated Part2 field to be a decimal type.

     

    Then added a final output field as below

     

    FinalOutput = IF(VALUE(NumText[Part2Num])=0,NumText[Part1],NumText[Data])

     

    Output