KNOWLEDGE BASE

Calculated Field With Date Function Returns Null Values When Using Live Connection to Database


Published: 30 Jun 2014
Last Modified Date: 13 Dec 2016

Issue

When connected live to a MySQL data source, a calculated field using the DATE function might return unexpected or null results.

Environment

  • Tableau Desktop
  • MySQL live connection

Resolution

Ensure that the DATE argument is in a YYYYMMDD format. For example:
IF [Date] <= DATE("19981201") THEN 1

Cause

MySQL expects a date format of YYYYMMDD in the query.
Did this article resolve the issue?