3 Replies Latest reply: Mar 25, 2013 8:57 AM by Faisal Zahid RSS

    addmonths and set analysis

      Hi guys,

       

      I am stuck on something and since I'm new to set analysis I dont know how to procced. I have the following expression:

       

        Sum({<Month = {"$(=month(addmonths(Max(Date),-1)))"},Year=,Date=>}Sales)

       

      The expression basically SUMS the previous months "Sales". This works perfectly but when I only have a years data. But when I have sales for more than a year (i.e there are multiple Feb (2012 &2013) it sums the sales for both years. I just want the previous months sales.

       

      Any ideas?

       

      Regarss