5 Replies Latest reply on Jan 17, 2020 6:21 AM by Paul Wachtler

    If else statement returns first & last value only

    Nadzirah Azeni

      Hi,

       

      I'm still a new user in Tableau. I created a report with one calculated field to read the currency for each transaction in my report.

      However, I notice the currency only return first and last value only. Below is my script. Is there any mistakes in my formula?

       

      IF [Currency] = '10544bc9-8037-4805-abbe-79bcb4f97890'

      THEN 'MYR' ELSEIF

      [Currency] = '80833CB3-E5B9-4F83-8730-3627433DB48D'

      THEN 'SGD' ELSEIF

      [Currency] = '94C3DF36-5827-47C2-A147-20FADA745370'

      THEN 'CHF' ELSEIF

      [Currency] = '637CDE30-D9C6-47CB-80BF-AC1B39F1B272'

      THEN 'EUR' ELSEIF

      [Currency] = '3B452BC5-D4C0-44A4-ABEC-582B3DDAD465'

      THEN 'JPY' ELSEIF

      [Currency] = 'C4BFB07A-3D19-4ED0-A7C6-68DCD136E1CA'

      THEN 'THB' ELSE 'USD'

      END