I've a calculated field in Tableau which has the Years (Date Value) from a date field. When I compare this calculated field with year of another field, I get error.
IF calculated_Field = YEAR(order_date)
1) calculated_Field is the one created using Date value of another field.
2) Order_date is a datetime field.
Error I see in the above IF statement says "Cant compare YEAR and INT values". When I solved that using below statement, it does not work as expected as IF returns FALSE.
IF INT(calculated_Field) = YEAR(order_date)