0 Replies Latest reply: Mar 24, 2017 9:01 AM by Timo Heijer RSS

    Set Analysis on current selection for last year

    Timo Heijer

      Good afternoon,


      I have two formulas which will do next:


      =sum({<SalesDate = {">=$(=MonthStart(AddMonths(Today(),-1)))  <= $(=MonthEnd(AddMonths(Today(),-1)))"}>}Sales)


      I use this Set Analysis formula to select only the previous month. In my current selections box, I have selected every month in the current year.




      (sum({<Year=, MonthName={'>=$(#=AddMonths(min(MonthName),-12))  <=$(#=AddMonths(max(MonthName),-12))'}, Month = ,Day = >}           Sales))   


      Then I have this formule which will give me, based on the current selections, the sales based on last year.


      I would like to combine these formulas. When I select the months January and February, I would like to see the sales based on last years February.


      Is there a simple solution for this problem?


      Regards Timo