In Tableau, sometimes we may have to perform calculations based on a specific date.
For example, your user may be interested in knowing the Sales that occured on a specific day, or you may have to use this information in some other calculation, so how you will perform such a calculation.
Conditional calculation such as:
if [Order Date] = ‘1/3/2019’ then ([Sales]) END
will throw an error “Can’t compare date and String values”.
If you write the above calculation without quotes around the date, you will still get an error “Can’t compare dates and float values’
For step-by-step instructions on how to resolve this error, visit: