4 Replies Latest reply on Aug 5, 2018 7:24 AM by meenu choudhary

    Trimming blank spaces

    Ivan Casana-Gallen

      Hello everyone


      I am trying to create the following field:



      Full name = [Surname],+" "+[First Name]


      It needs to have just one blank space after the comma, no more.


      The data I am using was exported from a database onto a CSV file, and for whatever reason sometimes there is a blank space before the First Name, but not always.


      My first thought was to use TRIM like I would do in Excel. So I converted the field to this:


      Full name =TRIM( [Surname],+" "+[First Name])


      However it is not always working there are still five entries with two consecutive blank spaces after the comma.


      Any suggestions?


      Thank you


      I would hate having to export the data to Excel to TRIM it and then upload it back to Tableau.