Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

IF statement set numeric value

I'm having a problem with a if statement.

It's seems simple but not or I'm making a mistake.
1 field (whole number) : Response tag

The new column is  

Status_SLA_Response = IF(VALUE([Response Tag])>0,0,1)
Status_SLA_Response is whole number

The problem is when [Response Tag] is 0, we get a blank result in the field Status__SLA_Response and we get the value 1 when [Response Tag] is positive ????? Not really the result expected !
What's wrong ?
 
  • Anonymous  not ideal but can you +0 to the end of it and see if that fixes it?

9 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    Anonymous  what data type is the responsetag?

     

    can you paste some of your data, i have tried to replicate your issue but not coming up with the same problem, wondering if its an underlying issue in your data

    • Anonymous's avatar
      Anonymous
      Not applicable

      Here is a sample of my data


      1.
      Response target
      20/01/2019 16:00:00
      Response Stop
      27/01/2019 05:05:05
      Response Tag : -2095
      = IF([ResponseTargetDate]<>BLANK(),DATEDIFF([ResponseTargetDate],[ResponseSLAStoppedDate],MINUTE),0)


      Status_SLA_Response: 0

      =IF([Response Tag]<0,1,0)
       
      2.
      Response target
      28/01/2019 16:00:00
      Response Stop
      28/01/2019 20:31:40
      Response Tag : 271
      Status_SLA_Response: Blank
       
      Could not find the mistake !
  • Hello Anonymous ,

     

    This actually looks wierd. Might need more details though.

    In the mean time, please try the below options - 

    1.  IF([Response Tag]>0,0,1)

    2. IF([Response Tag]<=0,1,0)

     

    Hope, this will help!

  • Hi Anonymous ,

     

    Please try using your expression with out VALUE keyword. I hope it will give you expected result.