KNOWLEDGE BASE

Custom SQL Returning Zero Instead of Percentage Values Because of Data Type


Published: 14 Nov 2017
Last Modified Date: 15 Nov 2017

Issue

Sometimes a percentage column from custom SQL defaults to 'Number (whole)' data type instead of 'Number (decimal)' despite having non-zero values in the first several decimal places of each row.

Environment

  • Tableau Desktop 10.1
  • Windows 7
  • Amazon Redshift

Resolution

Change the field to 'Number (decimal)' and the issue is resolved.

Cause

This is likely happening because the percentage field inherits the data type of the components that it is built from.
Did this article resolve the issue?