In Tableau Prep Builder, when a calculated field uses the DATE() function to convert an 8-digit string without delimiters (such as "20260901" or DATE(STR([SalesDate]))) into a Date type, running a flow that contains a Union step results in the calculated field evaluating to NULL (or excluding rows if used in a filter) in the output file (.hyper).
Symptoms & Behavior:
The DATE() function expects a standard, delimited date string format such as "yyyy-MM-dd" (e.g., DATE("2026-09-01")). When an 8-digit string without delimiter characters (nnnnnnnn) is provided, evaluation relies on implicit parsing rules, which fail and return NULL during full query execution across union inputs.
To resolve this issue, update the calculated field or filter condition using the DATEPARSE() function.
Explicitly defining the date format with DATEPARSE() ensures accurate date conversion without relying on implicit date guessing, regardless of whether a Union step is present.
Before:
DATE(STR([SalesDate]))
After:
DATE(DATEPARSE("yyyyMMdd", STR([SalesDate])))
Using the DATEPARSE() function with the YYYYMMDD string format allows the field to correctly evaluate as a Date type even in flows containing a Union step.
Tableau Help: Tableau Prep Functions Reference
Tableau Help: Convert a Field to a Date Field
005462357

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.