I have a dataset that is reading from a Redshift table. One of the columns I read in is start_date
, which is properly being identified as a Date and working completely fine within our dashboard.
I now want to add a new calculated field off of that start_date
column as follows:
ifelse(
formatDate({start_date}, 'MMM dd, yyyy') = 'Dec 11, 2022',
'Baseline Week',
formatDate({start_date}, 'MMM dd, yyyy')
)
When I add this new column, I can see in the dataset preview that the column is being properly set, but when a refresh is triggered (with no new data being added to the dataset), the refresh fails.
I even tried simplifying the column to a String column of:
formatDate({start_date}, 'MMM dd, yyyy')
and even that fails on refresh, but doesn’t fail in the preview.
This is the error I see when a refresh fails:
Error type:
INVALID_DATE_FORMAT Learn more
Your function expression contains an unsupported date. Correct the date format and try again.
Error details:
Format MMM dd, yyyy is not supported.
I figured that for some reason MMM dd, yyyy
may not be supported, so I tried to use formatDate(orderDate, 'dd MMM yyyy')
per the example in the documentation, but still saw the same issue.
Can someone help me understand why this could be happening?