Issue
When exporting Data as CSV in Tableau Desktop, or outputting a Flow in CSV format in Tableau Prep, Floating Point (decimal) values will display as Scientific Notation, or be truncated, depending on the below factors:
-
If there are 9 or less decimal places, then the value will remain unchanged. (e.g. 1.123456789 will remain unchanged)
-
If there are more than 9 decimal places but less than 16, and the value
has
less
than 4 zeroes directly succeeding the decimal place, the value is
truncated
to 9 decimal places. (e.g. 12.00124563478932 becomes 12.001245634)
-
If there are more than 9 decimal places but less than 16, and the value
has
at least
4 zeroes directly succeeding the decimal place, the value is displayed fully in
Scientific Notation
. (e.g. 0.00003005842567 becomes 3.00584E-05)
Resolution
Option 1
- Tableau Desktop:
-
Right-click the relevant field and select
Default Properties > Number Format
-
In the Dialog Window, select
Number (Custom)
and change the decimal places setting to allow for enough decimal places for the values (note that the highest allowed length is 16 decimal places).
-
Select
Ok
to close the Window.
-
Export the Data to CSV, the values should now display in full (up to 16 decimal places) without truncation.
Option 2
- Tableau Prep:
-
Export the flow as a Hyper file.
-
Open the Hyper File in Tableau Desktop.
-
Right-click the relevant field and select
Default Properties > Number Format
-
In the Dialog Window, select
Number (Custom)
and change the decimal places setting to allow for enough decimal places for the values (note that the highest allowed length is 16 decimal places).
-
Select
Ok
to close the Window.
-
Export the Data to CSV, the values should now display in full (up to 16 decimal places) without truncation.
Additional Information
-
Note that any value with more than 16 decimal places will always be truncated to the first 16 decimals. Tableau does not support more than 16 decimal places.
Discuss this article...