3 Replies Latest reply on Oct 9, 2012 5:52 AM by Paul Clerkin

    negative value if statement

    Paul Clerkin

      Hi. Hopefully someone can help.

       

      I have the following calculated field to create a table which categorises records.

       

      If [Deadline Days] > 5 THEN "5+ Days to Deadline"

      ELSEIF [Deadline Days] >4 Then "4 Days to Deadline"

      ELSEIF [Deadline Days] >3 THEN "3 Days to Deadline"

      ELSEIF [Deadline Days] >2 THEN "2 Days to Deadline"

      ELSEIF [Deadline Days] >1 THEN "1 Days to Deadline"

      ELSEIF [Deadline Days] >0 THEN "Less Than 1 Day to Deadline"

      ELSEIF [Deadline Days] <0 Then "Deadline Passed Today"

      ELSEIF [Deadline Days] <-1 Then "Deadline 1 Day Passed"

      ELSEIF [Deadline Days] <-2 Then "Deadline 2 Days Passed"

      END

       

      The table that this creates is as follows

      Less than 1 Day to Deadline1 Day to Deadline2 Days to Deadline3 Days to Deadline5+ Days to DeadlineDeadline passed today
      89253316350

       

      The problem I have is that it is lumping all remaining items in to the Deadline passed today category and ignoring the last to ELSEIF statements to reflect that there is data where the deadline days are -1.25, 2.25 etc.

       

      I am probably missing something obvious as to why it is ignoring the negative values ELSEIFs?

       

      Any help would be appreciated.