7 Replies Latest reply: May 30, 2013 2:46 AM by Some Nath Roy RSS

    Current Month and Previous Month

      Hi All,

       

      I need to take current and previous month sales based on the selected month and year

       

      My Sales Month  looks like this 1,2,3,4,5,6,7,8,9,10,11,12

       

      My Sales Yerar looks like this 2011,2012,2013

       

       

      To calculate current month sales i used this expression below (based on selected month),

       

       

      =

      sum({<SALES_MONTH={"$(=max(SALES_MONTH))"}>} $(vSales)

       

      It works but when i try to calculate the previous month using the expression below, value is coming as "0"

       

        

      =

      sum({<SALES_MONTH={"$(=max(SALES_MONTH)-1)"}>} $(vSales)

       

       

      Kindly guide where i'm wrong in this expression

       

      Thanks,

      Selva