9 Replies Latest reply on Jul 23, 2012 10:03 AM by Juracy Americo

    Would a function like InYearToDate() be useful to anyone?

    Joe Mako

      I recently created a example workbook at The specified item was not found. that deals with current YTD and comparing to previous YTD.


      Here is one of the calculations, that Sums the Amount for Last year's YTD:



       IF DATEPART('dayofyear',[Date]) <= DATEPART('dayofyear',TODAY())
      AND DATEPART('year',[Date]) = DATEPART('year',TODAY())-1
      THEN [Amount] END)


      Would it be useful to instead write:



       IF InYearToDate ([Date], TODAY(), -1)
      THEN [Amount] END


      Or how about something like:



       IF InPartToDate ('year', [Date], TODAY(), -1)
      THEN [Amount] END