12 Replies Latest reply on Sep 13, 2018 5:03 PM by Manuel Ramos

    Expected END to Match IF at character 0

    Manuel Ramos

      Hello Tableau Community!

       

      Can someone help me fix this Calculated Field?

       

       

      CASE [Case Distributions, Backlog & Closures Picker]

      WHEN 1 THEN [Assigned to CSR GMT] >= DATE([DATEADD('hour',7,NOW())])

      WHEN 2 THEN DATE([Assigned to CSR GMT]) = DATE([DATEADD('hour',7,NOW())])-1

      WHEN 3 THEN IF DATEPART('year',[Assigned to CSR GMT]) = DATEPART('year',TODAY())THEN

                      DATEPART('week',[Assigned to CSR GMT]) = DATEPART('week',TODAY())

      WHEN 4 THEN IF DATEPART('year',[CLOSEDDATE_GMT]) = DATEPART('year',TODAY())THEN  

                      DATEPART('week',[CLOSEDDATE_GMT]) = DATEPART('week',TODAY())

      WHEN 5 THEN STR([CLOSEDDATE_GMT]) = NULL

      END