1 Reply Latest reply on Jun 15, 2016 7:44 PM by Ivan Young

    How to bring two different years customers values at one place?

    Manoj Kumar Vemparala



      My question is, i am having a database with month, year, customer and price as columns. I have given Month and Year as parameters names P-Month and P-Year. Now i am trying to write a calculation to get previous 12 month based on the given parameter month.


      So, if parameter month is 2 and parameter year is 2016, i need to get data from 2015 month 2 to 2016 month 1.


      This is the calculation i am trying. I don't want to use date functions.


      IF [Par Month] >=1 AND [Par Month] <=6

      THEN (IF [Year] = [Par YEAR]-1 AND [Month] >= [Par Month] THEN [Price] ELSE 0 END) ELSE 0 END


      Could some one help me out in this.


      I am trying to figure out same for Previous previous 12 months.