3 Replies Latest reply on Jun 20, 2019 12:25 PM by Paul Wachtler

    Calculated field for last day of a specific month

    Okan Olgac

      I am looking for a calculation to determine the last day of a specific month. We have training classes in our organization that need to be completed during specific months of the year. For example, Training A must be completed every June unless you're a new employee, in which case you must do it immediately after starting, regardless of what month it is. I used the following formula to determine the last day of the month for Training A the following year, but it doesn't take into account the individuals that are new and took their training in a different month.

       

      DATETRUNC('month', DATEADD('month', 13, [Training A Date])) -1)

       

      So using this formula, if we have a new employee that had to take Training A in the month of April instead of the designated June, it calculates the next year's deadline as being the last day of next April. Essentially, I am looking for a way to edit this formula so that it will give me the last day in June, even if the person took their training in April, October, etc.

       

      Note: I am currently on Tableau Desktop 10.4

       

      Thank you in advance,

       

      Okan