KNOWLEDGE BASE

CSV outputs of Floating Point values either display in Scientific Notation, or are truncated


Published: 22 Mar 2019
Last Modified Date: 30 Sep 2019

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)

 

Environment

  • Tableau Prep
  • Tableau Desktop
  • CSV Files

Resolution

Option 1 - Tableau Desktop:
  1. Right-click the relevant field and select Default Properties > Number Format
  2. 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).
  3. Select Ok to close the Window.
  4. Export the Data to CSV, the values should now display in full (up to 16 decimal places) without truncation.

Option 2 - Tableau Prep:
  1. Export the flow as a Hyper file.
  2. Open the Hyper File in Tableau Desktop.
  3. Right-click the relevant field and select Default Properties > Number Format
  4. 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).
  5. Select Ok to close the Window.
  6. Export the Data to CSV, the values should now display in full (up to 16 decimal places) without truncation.


 

Cause

This behavior is currently under investigation by our Development team.

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... Feedback Forum
Did this article resolve the issue?