4 Replies Latest reply: Apr 27, 2015 11:39 AM by Sunny Talwar RSS

    Sum using AddYears Function for Date Formatted MMDDYYYY



      I am having difficulties with the AddYears function just when I though I had figured it out and was working.  I loaded my data setting the date format as follows:


      SET DateFormat='MM/DD/YYYY';


      I am trying to sum a value for a specific column based on the value for 1 year prior to the max year in the table using the following expression:


      =Sum({$<[POS Date]={"$(=Num(AddYears(Date(Max([POS Date],'MMDDYYYY')),-1)))"}>}[POS Adjusted Fair Value])


      At one point this was functioning, however when I reloaded my updated data something changed.  Any help would be appreciated.