8 Replies Latest reply: Feb 24, 2012 5:58 PM by Jared Rothfuss RSS

    Set Analysis of a Date

    Jared Rothfuss

      I need to compare results from the month prior to my current selections. I have used set analysis to do this quite effectively for YEAR which is a number. My attempts to do the same thing with POST_MONTH, which is the monthstart in date format, have repeatedly failed.

       

      This code works for YEAR:
      sum({$<YEAR={$(=only(YEAR)-1)}>}AMOUNT)

       

      This code returns the previous month date that I am interested in:
      ADDMONTHS(POST_MONTH,-1)

       

      I've read many posts here and tried dozens of different ways. How can I successfully combine the two?
      Thank you.
      Jared