4 Replies Latest reply on Jul 31, 2017 7:27 PM by Tiago Valente

    How to find maximum number of days in a year (based on today's date)

    Tiago Valente

      Hi All,

       

      I'm trying to define the maximum number of days in a year given today's date. I am trying to do this to make sure I don't treat a leap year as having 365 days.

       

      In excel the formula would be:

       

      =DATE(YEAR(A2),12,31)-DATE(YEAR(A2),1,1)+1

       

      Where Cell A2 has your date.

       

      I am struggling to replicate this in Tableau and would appreciate it if anyone can shed some light.

       

      Cheers!