3 Replies Latest reply on Sep 30, 2016 2:46 AM by Tom W

    Current Year vs Last Year

    monika sheoran

      Hi Guys,

       

      I have a requirement where I want to show the comparison of sales for current and previous year.

      My data format is : date, sales

      datesales
      01/01/2016100
      15/02/2016150
      05/01/2015200
      09/02/2015300
      20/03/2015500

       

      MonthYear

      Current Year Sales
      Previous Year Sales
      Jan2016100200
      Feb2016150

       

      300
      Mar2016500

       

      Output required : Month-Year, Current Year Sales, Previous Year Sales.

      (Assuming user selected start_date = 01/01/2016 and end_date 30/03/2016)

       

      My requirement is to provide parameters start_date and end_date to user to filter the data.

      I have created a calculated field DateRange (date>=end_date and date<=start_date). In my sheet I am dragging this column and selecting its value TRUE. Reason behind doing this as parameter is required due to wrapper we are using and I can't skip it.

      By selecting it true I want to display only those no of months which falls between start and end date.

       

      When user selects dates then Current Year Sales value is coming as expected But Previous Year Sales is coming NULL. What should be best approach to get the desired result.

       

      Thanks

      Monika