1 Reply Latest reply on Oct 22, 2014 11:09 AM by Shawn Wallwork

    Calculated field with "null" value


      I am working on creating some calculated fields in Tableau 8.2.


      The data for the "test2" field is imported from Access.  They can be numbers or "Null" in text.

      I also have fields "test1" and "minimum" and "maximum".  "test1", "minimum" and "maximum" are only numbers.

      I would like to do an calculated field with an if statement.


      The name of the calculated field is "answer".


      I would like to do the following:


      1) If "test2" is not "Null" and "test2" < "minimum" then calculate "minimum" - "test2".

      (I was using the syntax IIF and != for not equal, but it did not like it because "Null" is a string value)


      2) else if "test2" is not "Null" and "test1" < "minimum" then calculate "minimum" - "test1"


      How would I go about doing this?  Please advise.