4 Replies Latest reply on Aug 23, 2016 11:03 AM by Alexandra Aquino

    String value problem.

    Alexandra Aquino

      I have a column in Excel of string type (column A).


      When this value is read with Tableau, "ABC" and "ABC " it´s read as a unique value.

      I need to read “ABC” and “ABC “ as distinct values.


        • 1. Re: String value problem.
          David Li

          Hmm, interesting! I hadn't known that Tableau trims Excel input during the load. Can you edit the data source to use some character other than a space to indicate the difference between the two descriptions?

          1 of 1 people found this helpful
          • 2. Re: String value problem.
            Joshua Milligan



            This is an odd one.  There are a couple of possible approaches:

            1. Adjust the data in Excel, either using David Li's suggestion, or using some of the calculations you have above to determine which is which.

            2. Use the Legacy Excel connections so that you get the data with the spaces -- only available on PC, not Mac.  (When you open the Excel file, use the drop down on the Open button: )


            With the legacy connection, you'll still see Tableau trim the field when you use, but you can use a calculated field with LEN([Field]) to get the different lengths:


            (it collapses to the trimmed value)




            (the lengths are different)


            And that let's you split out the distinct values you want (you can hide the headers for Length if desired).


            Anyways, a strange work-around, but maybe something you can use.


            Hope it helps!


            2 of 2 people found this helpful
            • 3. Re: String value problem.
              Alexandra Aquino

              Thank you Joshua!!

              Your response has been very helpful.


              • 4. Re: String value problem.
                Alexandra Aquino

                Thank you David for your help!!