Hi Li Ma,
CSV is a type of text file, what you can do is set the long digit numbers as text in Tableau.
Sorry for late reply. I was on holiday. The dimension i had for the long digit id is already in string format. However when downloading into csv file and open from excel, it still truncated the data. The only way i seem to cope this issue is to open a bland excel file and read from text, select the target column as text format. Do you have better approach?
This is more of an Excel issue than a tableau one, Excel's handling of CSVs an long numbers isn't great. The better option would be to import into Excel and set the field to text as you said above, but there might be work arounds.
Is the report used as a visual report in Tableau, or is it purely to generate this export? If it's just to generate the report then formatting the field as:
will look a bit weird in tableau, but when opened will show correctly in Excel. If the report it used to view you can put this field in a way that it will export in a way where it is present.
Yes, i need it for both generating report and graphs. Do you mean add "" to the results, when downloading to excel, it will show as a text without ""?
Yeah, if you load a CSV with ="" wrapped around it, it needs the equals sign as well as the quotes, it will open it as a formula in a cell so won't truncate it. Obviously this won't look as good in tableau, but you could have a calculated field as a secondary field on the detail shelf so it's not displayed.
i actually extract the long ID from a database and use as a dimension. Not sure how i can change it in a Tableau dimension.
You wouldn't be able to change it in Tableau directly, but can create a calculated field along the lines of the following for it.
'="' + [ID] + '"'