KNOWLEDGE BASE

How to Convert Excel's If Function to Calculated Field


Published: 24 Jun 2020
Last Modified Date: 30 Jun 2020

Question

How to convert Excel's IF function in Tableau?
e.g. IF(C2=”Yes”,1,2)
 

Environment

  • Tableau Desktop

Answer

IF [C2]= "Yes" THEN 1 ELSE 2 END

User-added image
Did this article resolve the issue?