Loading

Error "Schema/DataTable mismatch" When Using DATEADD()

Julkaisupäivä: Feb 24, 2026
Kuvaus
When creating a calculation using DATEADD(), that has division in the interval argument, the calculation is valid.  However, when the calculation is added to the view Tableau Desktop returns the following error:
 
Unable to complete action ColumnTable:
Schema/DataTable mismatch" error when the calculation is added to the view

Cause

The DATEADD() function requires an integer for the interval argument. Division will convert a number to decimal number, also known as a float.
Ratkaisu
Wrap the formula in the interval argument in INT().
SUGGESTION: Add parentheses around the interval argument in INT().

For example, an original equation may look like this:
SUGGESTION: For example, an original calculation may look like this:
DATEADD('day', [Parameter]/2, [Date Field] )

And then may become this after wrapping the formula in the interval argument in INT():
SUGGESTION: And then, after encapsulating the interval argument in INT(), will look like this:
DATEADD('day', INT( [Parameter]/2 ), [Date Field] )
Lisäresurssit
Some live data sources may not experience this issue, for example Microsoft SQL Server, as those data sources are more flexible with data types.

Knowledge-artikkelin numero

001471238

 
Ladataan
Salesforce Help | Article