3 Replies Latest reply on Jun 12, 2017 6:02 AM by Michael Gillespie

    How do I calculate if consecutive months are equal to a particular value?

    Steffan Jones

      I am trying to calculate if the previous month and the month prior (although I may want to extend this to maybe 3 or 6 months prior at some stage) are greather than or equal to a particular value, in this secanrio whether any SLA breaches occured. I understand a calculated field is required but am struggling on finding the correct syntax in order to achieve this.


      The syntax I currently have is as follows, and although this calculation is not valid - "Can't logically 'AND' integer and integer values" - but you will probably be able to see my thoughts towards approaching the syntax.


      IF ((MONTH(MAX([Created Date])-1) AND MONTH(MAX([Created Date])-2)) AND [SLA Breach] >=1) THEN "True"

      ELSE "False"



      I would prefer to have a Boolean result, but again have been unable to find the correct syntax to achieve this.


      I am currently using Tableau Desktop vesion 10.1