4 Replies Latest reply on Jun 13, 2018 3:47 AM by Jordan Brogden

    Replace within number

    Jordan Brogden

      Hi,

       

      I have a dataset which (annoyingly!) returns numbers including a '.' character

       

      It's not a thousand seperater so I don't even know why it's there.

       

      Anyway - I basically need to find and replace the '.' and replace it with blank. This is what I've been doing in Excel but I would like Tableau Prep to do this as part of my data prep flow.

       

      The REPLACE and REGEXP_REPLACE functions can only accept string - I've tried converting to string to then perform the calc to then 're-convert' to a number value however converting the numbers to a string sends them haywire and adds a load of numbers on the end.

       

      This seems like a pretty straightforward request I would hope, can anybody help?

       

      My data looks like this: where 41.31 should be 4131, 1.526 should be 1526 and so on.

        

      LaunchedProfiles
      08-06-18 16:0041.31
      08-06-18 09:451.425
      08-06-18 09:201.526
      08-06-18 09:105.99
      08-06-18 08:458.751
      08-06-18 08:196.382
      03-06-18 16:066.328
      02-06-18 17:4730.484
      31-05-18 11:2925
      24-05-18 17:581.198
      24-05-18 17:1541.553
      24-05-18 15:30332.047
      23-05-18 15:4542.858
      23-05-18 15:07360.196
      22-05-18 12:3022.225
      22-05-18 11:55148.752
      18-05-18 16:3712.97
      18-05-18 16:001.161
      18-05-18 15:5024.878

       

      Thank you,

      Jordan