forums
Use these forums to ask questions and discuss Tableau.
Accessing a numeric field in a text file data source as a string
Posted June 18th, 2008 by Richard Leeke
I have a CSV file with a field which has numeric content, but the values are actually an encoded representation of that I need to decode by chopping it up based on character position (which is easy with the built in string functions).
However, Tableau tries to treat the field as numeric. If I override this and set the datatype to string, the value that I get has had any leading zeroes truncated - which means I can't decode it based on position. I can't always tell how many leading zeroes there should have been.
Is there any way to get the raw string from the original text file?
Thanks.
Comments
Richard,
Depending on the source of the data, you might be able to export it with quotes ("") around the value. Tableau will assume anything in quotes is text, and leave the value (with leading zeros) intact.
Thanks - should have thought of trying that.